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:
Naïm Favier 2021-12-28 23:21:23 +01:00 committed by GitHub
parent 63846c3e82
commit b6f1dc9667
Failed to generate hash of commit

View file

@ -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()