diff options
author | Tom Milligan <tom.milligan@uipath.com> | 2023-07-22 09:37:08 +0100 |
---|---|---|
committer | Tom Milligan <tom.milligan@uipath.com> | 2023-07-22 10:43:47 +0100 |
commit | 76212fccfb0b4978c1d35e2a0f688fbf8af2303a (patch) | |
tree | 62f80ceaf203e394b6c0e79fe8278bf6a6257f13 | |
parent | 681c991a9a235f4e5d1fcf08644cd7fd0a234d36 (diff) |
internal: refactor how whitespace is added
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -205,7 +205,8 @@ impl<'a> Admonition<'a> { // In line with the commonmark spec, this allows the inner content to be // rendered as markdown paragraphs. format!( - r#"<{admonition_block} id="{ANCHOR_ID_PREFIX}-{anchor_id}" class="admonition {additional_class}"> + r#" +<{admonition_block} id="{ANCHOR_ID_PREFIX}-{anchor_id}" class="admonition {additional_class}"> {title_html}<div> {content} @@ -341,7 +342,7 @@ fn preprocess( for (span, block) in admonish_blocks.iter().rev() { let pre_content = &content[..span.start]; let post_content = &content[span.end..]; - content = format!("{}\n{}{}", pre_content, block, post_content); + content = format!("{}{}{}", pre_content, block, post_content); } Ok(content) |