- title
- Abhirag
- dated
- 2025
- related
- Nothing
Testing Aside Elements
This is a regular paragraph with some content.
More regular content after the aside. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
This is a figure caption explaining the diagram above. Notice how it appears below the image.
Code Example
Here’s an example of using jotdown to transform links:
let events =
jotdown:: Parser :: new ( "a [link](https://example.com)" ). map ( |e| match e {
Event :: Start ( Link ( dst, ty), attrs) => {
Event :: Start ( Link ( dst. replace ( ".com" , ".net" ). into (), ty), attrs)
}
e => e,
});
let html = jotdown:: html:: render_to_string ( events);
assert_eq! ( html, "<p>a <a href=\"https://example.net\">link</a></p>\n" );
let events =
jotdown::Parser::new("a [link](https://example.com)").map(|e| match e {
Event::Start(Link(dst, ty), attrs) => {
Event::Start(Link(dst.replace(".com", ".net").into(), ty), attrs)
}
e => e,
});
let html = jotdown::html::render_to_string(events);
assert_eq!(html, "<p>a <a href=\"https://example.net\">link</a></p>\n");