Skip to content

Expose "meta" and "markup" in nodes #38

Closed
@olegbl

Description

@olegbl

tokensToAST loses some info when converting from markdownit tokens to react-native-markdown-renderer nodes.

The "meta" field would allow plugins to be able to pass down extra data to the token renderer. https://markdown-it.github.io/markdown-it/#Token.prototype.meta

The "markup" field would allow token renderers to distinguish between certain similar tokens (e.g. "strong" sources from __strong__ vs. from **strong**) and render them appropriately. https://markdown-it.github.io/markdown-it/#Token.prototype.markup

Perhaps just exposing the source "token" on the "node" would solve this kind of issue going forward too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions