-
-
Notifications
You must be signed in to change notification settings - Fork 615
Open
Description
I'm interested in manipulating markdown ASTs.
It's sometimes problematic to extract a fragment, e.g.
header = Markly.parse("### Hello `World`").first_child
fragment = header.extract_children # Move all children to a node of type `custom`
fragment.to_markdown # => "Hello `World`\n\n"I'm having trouble with the output formatting.
Ideally, the fragment would just be the raw children, e.g.
fragment.to_markdown # => "Hello `World`"This would make it a little easier to mash up the AST with different types of outputs.
I suppose the issue is the formatting of custom type nodes, but I'm not sure if there is a problem to change this.
In other words, either (1) we could change the output to be "inline" or add an inline "fragment" node type which does minimal formatting. Thoughts?
Metadata
Metadata
Assignees
Labels
No labels