\n\n"
+ │ , Div
+ │ ( "" , [ "details" ] , [] )
+ │ [ Div
+ │ ( "" , [ "summary" ] , [] )
+ │ [ Header
+ │ 2
+ │ ( "book__markdown__src__chaptermd__heading"
+ │ , [ "unnumbered" , "unlisted" ]
+ │ , []
+ │ )
+ │ [ Str "Heading" ]
+ │ , Para [ Str "text" ]
+ │ ]
+ │ , RawBlock (Format "html") "
\n\n"
+ │ , Div
+ │ ( "" , [ "p" ] , [] )
+ │ [ Para [ Str "more" , Space , Strong [ Str "markdown" ] ] ]
+ │ ]
+ │ , RawBlock (Format "html") "
\n \n"
+ │ , Para [ Str "outside" , Space , Str "divs" ]
+ │ ]
+ "###);
+ }
+
#[test]
/// Respect enabled/disabled extensions in Pandoc's `from` option
fn extension_overrides() {
diff --git a/src/pandoc/extension.rs b/src/pandoc/extension.rs
index bf2a941..b7d6024 100644
--- a/src/pandoc/extension.rs
+++ b/src/pandoc/extension.rs
@@ -9,6 +9,7 @@ pub enum Extension {
Attributes,
GfmAutoIdentifiers,
RawAttribute,
+ FencedDivs,
// TODO: pandoc's `rebase_relative_paths` extension works for Markdown links and images,
// but not for raw HTML links and images. Switch if/when pandoc supports HTML as well.
/// Treat paths as relative to the chapter containing them
@@ -27,6 +28,7 @@ impl Extension {
Extension::Attributes => "attributes",
Extension::GfmAutoIdentifiers => "gfm_auto_identifiers",
Extension::RawAttribute => "raw_attribute",
+ Extension::FencedDivs => "fenced_divs",
Extension::RebaseRelativePaths => "rebase_relative_paths",
}
}
@@ -41,6 +43,7 @@ impl Extension {
Extension::Attributes => (2, 10, 1),
Extension::GfmAutoIdentifiers => (2, 0, 0),
Extension::RawAttribute => (2, 10, 1),
+ Extension::FencedDivs => (2, 0, 0),
Extension::RebaseRelativePaths => (2, 14, 0),
};
Version {
diff --git a/src/preprocess.rs b/src/preprocess.rs
index 2c8d04d..569c0d1 100644
--- a/src/preprocess.rs
+++ b/src/preprocess.rs
@@ -672,6 +672,7 @@ struct PreprocessChapter<'book, 'preprocessor> {
parser: Peekable