From e419ebc2e0e05e3fa99c7fe494011a0c4ad4aed3 Mon Sep 17 00:00:00 2001 From: noxware <7684329+noxware@users.noreply.github.com> Date: Thu, 4 Apr 2024 01:08:49 -0300 Subject: [PATCH] updated markdown example to one requireing interactivity --- examples/markdown-editor/src/app.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/markdown-editor/src/app.rs b/examples/markdown-editor/src/app.rs index efcd23f..1111531 100644 --- a/examples/markdown-editor/src/app.rs +++ b/examples/markdown-editor/src/app.rs @@ -1,12 +1,12 @@ use hframe::Aware; const INITIAL_MARKDOWN: &str = r#" -# Hello +# Kiryu & Majima Dancing -![comrak author gh profile picture](https://avatars.githubusercontent.com/u/1915?v=4) + -- World - - !!! +- Amazing + - Characters "#; pub struct App { @@ -40,8 +40,10 @@ impl eframe::App for App { egui::TextEdit::multiline(&mut self.markdown_input), ); - let html = - comrak::markdown_to_html(&self.markdown_input, &comrak::Options::default()); + let mut options = comrak::Options::default(); + options.render.unsafe_ = true; + + let html = comrak::markdown_to_html(&self.markdown_input, &options); let styled_html = format!("