-
-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Apple now has https://github.com/swiftlang/swift-markdown, its own markdown parser, also based on https://github.com/swiftlang/swift-cmark.git (just like Parsley). It offers easy modification of the AST, something that Parsley does not offer, but is missing features that Parsley offers.
Parsley does the code block titles, handles frontmatter, and splits the first title from the body.
Swift Markdown does none of that, but has the AST modification.
I kinda wonder if Parsley should make be based on top of Swift Markdown 🤔 It could add the unique features that Swift Markdown is missing, getting the AST stuff for free.
We could keep the public API the same, with the same markdown options and syntax extensions, but add the markup rewriter stuff.
The code block title feature could become a MarkupRewriter that transforms the AST, which is cleaner than the current regex pre/post-processing approach.