diff options
| author | Xe Iaso <me@xeiaso.net> | 2023-03-31 07:56:59 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2023-03-31 07:56:59 -0400 |
| commit | c78d291679a0b054e20ad35784dd5a8f9238f0a9 (patch) | |
| tree | c6d1a84391b012f9c15778d7a7ef403dbf3ef9be /lib | |
| parent | 3450542f60caa3a3cfbfb75f41b65e48687cae65 (diff) | |
| download | xesite-c78d291679a0b054e20ad35784dd5a8f9238f0a9.tar.xz xesite-c78d291679a0b054e20ad35784dd5a8f9238f0a9.zip | |
fix comrak break
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/xesite_markdown/src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/xesite_markdown/src/lib.rs b/lib/xesite_markdown/src/lib.rs index 11099f6..40d85ab 100644 --- a/lib/xesite_markdown/src/lib.rs +++ b/lib/xesite_markdown/src/lib.rs @@ -1,5 +1,5 @@ use color_eyre::eyre::{Result, WrapErr}; -use comrak::nodes::{Ast, AstNode, NodeValue}; +use comrak::nodes::{Ast, AstNode, LineColumn, NodeValue}; use comrak::plugins::syntect::SyntectAdapter; use comrak::{ format_html_with_plugins, markdown_to_html_with_plugins, parse_document, Arena, ComrakOptions, @@ -20,7 +20,7 @@ pub fn hash_string(inp: String) -> String { } lazy_static! { - static ref SYNTECT_ADAPTER: SyntectAdapter<'static> = SyntectAdapter::new("base16-mocha.dark"); + static ref SYNTECT_ADAPTER: SyntectAdapter = SyntectAdapter::new("base16-mocha.dark"); } #[derive(thiserror::Error, Debug, Clone)] @@ -83,6 +83,7 @@ pub fn render(inp: &str) -> Result<String> { let new_node = arena.alloc(AstNode::new(RefCell::new(Ast::new( NodeValue::HtmlInline(html), + LineColumn { line: 0, column: 0 }, )))); parent.append(new_node); |
