mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00

To support images on that screen, we'll first need to adjust the base url for each platform, or rewrite the local image URLs, as otherwise they are resolved to _anki/pages/...
11 lines
371 B
Rust
11 lines
371 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
use pulldown_cmark::{html, Parser};
|
|
|
|
pub(crate) fn render_markdown(markdown: &str) -> String {
|
|
let mut buf = String::with_capacity(markdown.len());
|
|
let parser = Parser::new(markdown);
|
|
html::push_html(&mut buf, parser);
|
|
buf
|
|
}
|