Render DocBook strings containing < but not </ (#400)
The current check is too restrictive and will not match strings containing only self-closing tags, for example the description of `time.timeZone`.
This commit is contained in:
parent
63846c3e82
commit
b6f1dc9667
|
@ -18,7 +18,7 @@ pub trait PandocExt {
|
|||
|
||||
impl<T: AsRef<str>> PandocExt for T {
|
||||
fn render(&self) -> Result<String, PandocError> {
|
||||
if !self.as_ref().contains("</") {
|
||||
if !self.as_ref().contains("<") {
|
||||
return Ok(format!(
|
||||
"<rendered-docbook>{}</rendered-docbook>",
|
||||
self.as_ref()
|
||||
|
|
Loading…
Reference in a new issue