gjtorikian / commonmarker

Ruby wrapper for the comrak (CommonMark parser) Rust crate
MIT License
416 stars 80 forks source link

Strikethrough and CommonMarker::Node initialization #191

Closed paydaylight closed 1 year ago

paydaylight commented 1 year ago

Are there any ways of initializing just a strikethrough node?

Like:

CommonMarker::Node.new(:strikethrough)

From docs I know that I can pass to constructor types supported out of the box, but not ones that are from extensions.

gjtorikian commented 1 year ago

If I'm understanding your question correctly, no, there is not. You can iterate over a document or take different actions when rendering, but you cannot just add nodes that aren't already present in the commonmark source text.