Markdown parser fork with extended syntax for personal use.
1micromark.js: unquoted: is `completeAttributeValueUnquoted`s case for `completeAttributeNameAfter` missing a `/`?. I’ve added it here.
2micromark.js: `]` case in cdata_end does not need to consume, it can defer to `cdata_close`, which should save 1 line
3micromark.js: should `tagOpenAttributeValueUnquoted` also support a slash?
4micromark.js: `atLineEnding` in html (text) should always eat arbitrary whitespace? code (indented) has no effect on html (text)?
5
6```rs
7// ---------------------
8// Useful helper:
9extern crate std;
10use std::println;
11use alloc::string::String;
12
13 let mut index = 0;
14 let mut balance = 0;
15 println!("before: {:?}", tokenizer.events.len());
16 while index < tokenizer.events.len() {
17 let event = &tokenizer.events[index];
18 if event.kind == Kind::Exit {
19 balance -= 1;
20 }
21 let prefix = String::from_utf8(vec![b' '; balance * 2]).unwrap();
22 println!(
23 "ev: {}{:?}:{:?} ({:?}): {:?}",
24 prefix, event.kind, event.name, index, event.link,
25 );
26 if event.kind == Kind::Enter {
27 balance += 1;
28 }
29 index += 1;
30 }
31```