Feat: move the rsx macro around
This commit is contained in:
1 parent
1919f88f03
commit
50c8b93aad
23 files changed
+886
-617
No files matched your search
@@ -0,0 +1,31 @@
|
||||
use dioxus_ssr::prelude::{Context, VNode};
|
||||
|
||||
// Parse a snippet into
|
||||
pub fn markdown_to_snippet<'a, P>(ctx: Context<'a, P>, text: &str) -> Vec<VNode<'a>> {
|
||||
let snips = Vec::new();
|
||||
use pulldown_cmark::{Options, Parser};
|
||||
let mut options = Options::empty();
|
||||
let mut parser = Parser::new_ext(text, options);
|
||||
|
||||
while let Some(evt) = parser.next() {
|
||||
match evt {
|
||||
pulldown_cmark::Event::Start(tag) => {
|
||||
// take until the end
|
||||
let r = parser.next();
|
||||
}
|
||||
|
||||
// push a p{} tag with the contents
|
||||
pulldown_cmark::Event::Text(text) => todo!(),
|
||||
|
||||
// Code delinates an end
|
||||
pulldown_cmark::Event::Code(code) => todo!(),
|
||||
|
||||
// not supported
|
||||
pulldown_cmark::Event::Html(ht) => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
snips
|
||||
}
|
||||
Reference in new issue
Block a user