diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-05-02 10:04:31 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-05-02 10:04:31 +0000 |
commit | 3976034a4b99a750946d2f5242158db2fef33d35 (patch) | |
tree | ef727d87fd8a2b8d2fbc7ab599371defb947a0d9 /src | |
parent | 6e50114f361f3237c132a51c554cd24b37fb765c (diff) | |
parent | 2d1db750d50b6b68ca31d7ade1bba0316b792aa8 (diff) | |
download | subplot-3976034a4b99a750946d2f5242158db2fef33d35.tar.gz |
Merge branch 'multi-ast' into 'main'
pandoc_ast: Support multiple versions of pandoc_ast
See merge request subplot/subplot!155
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 8 | ||||
-rw-r--r-- | src/visitor/structure.rs | 1 |
2 files changed, 9 insertions, 0 deletions
@@ -5,6 +5,14 @@ //! stakeholders. #![deny(missing_docs)] + +// Handle the multiple pandoc_ast versions + +#[cfg(feature = "pandoc_ast_07")] +extern crate pandoc_ast_07 as pandoc_ast; +#[cfg(feature = "pandoc_ast_08")] +extern crate pandoc_ast_08 as pandoc_ast; + mod error; pub use error::Result; pub use error::SubplotError; diff --git a/src/visitor/structure.rs b/src/visitor/structure.rs index e9218d3..a9d7c3f 100644 --- a/src/visitor/structure.rs +++ b/src/visitor/structure.rs @@ -93,6 +93,7 @@ fn join_into_buffer(vec: &[Inline], buf: &mut String) { Inline::Image(_, v, _) => join_into_buffer(v, buf), Inline::Note(_) => buf.push_str(""), Inline::Span(_attr, v) => join_into_buffer(v, buf), + #[cfg(feature = "pandoc_ast_08")] Inline::Underline(v) => join_into_buffer(v, buf), } } |