You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we add classes to tags other than Heading? I couldn't find a solution for this. It might be useful to do so in cases like adding dir=auto to the classes of Tag::Paragraph or Tag::List. I might be missing a better approach.
Currently, I am achieving this for Tag::Heading using the following code:
let parser = Parser::new_ext(markdown_input, options).map(|event| match event {Event::Start(mut tag) => {ifletTag::Heading{ classes, .. } = &mut tag {
classes.push("dir=auto".into());}Event::Start(tag)}
_ => event,});
Can we do this in other ways that I might not be aware of, which might be applicable to Tag::Paragraph and others too?
The text was updated successfully, but these errors were encountered:
Can we add classes to tags other than
Heading
? I couldn't find a solution for this. It might be useful to do so in cases like addingdir=auto
to the classes ofTag::Paragraph
orTag::List
. I might be missing a better approach.Currently, I am achieving this for
Tag::Heading
using the following code:Can we do this in other ways that I might not be aware of, which might be applicable to
Tag::Paragraph
and others too?The text was updated successfully, but these errors were encountered: