mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00

* Prepare to switch Rust import style * Run nightly format Closes #2320 * Clean up a few imports * Enable comment wrapping * Wrap comments
12 lines
389 B
Rust
12 lines
389 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;
|
|
use pulldown_cmark::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
|
|
}
|