Skip to content

Commit

Permalink
dealing with broken div
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGreenup committed Oct 28, 2024
1 parent 47130ec commit d138bb9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/bin/md_example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ use draftsmith_render::replace_text;
const DOC: &str = r#"
# Heading
# Admonitions
<div class="tip">
<p>Also maps closer to tailwind css (easier for me)</p>
</div>
# Basic Text
This is my input.\
1. Also [my](#) input.
Expand All @@ -16,14 +26,15 @@ This is some code
- Normal
- ![](https://example.com/image.png)
- Figure
- ![image](https://example.com/image.png "this is an image xyz")
- ![notrim](https://example.com/image.png)
- Wiki
- [[!Image|https://example.com/image.png]]
- [[!https://example.com/image.png]]
- Link
- Normal
- [Link](https://example.com)
- Wiki
- [[Link|https://example.com]]
- [[Link]]
- Transclusion
- [[Link|https://example.com]]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub fn replace_text(document: &str, orig_string: &str, replacement: &str) -> Str
}
}

// println!("{:#?}", root);
println!("{:#?}", root);

let mut html = vec![];
format_html(root, &Options::default(), &mut html).unwrap();
Expand Down

0 comments on commit d138bb9

Please sign in to comment.