Skip to content

Build on top of swift-markdown? #3

@kevinrenskers

Description

@kevinrenskers

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions