Skip to content

Inline markdown #18

@tad-lispy

Description

@tad-lispy

Hey! Thanks for this plugin. I am playing with PostHTML and it seems very handy.

Would it make sense to support inline markdown content? Like this:

        <markdown>Inline **markdown**</markdown>

Currently (with parcel@nightly) this produces:

TypeError: Cannot read property 'src' of undefined
    at /parcel-2-posthtml-playground/node_modules/posthtml-include-md/index.js:20:28
    at /parcel-2-posthtml-playground/node_modules/posthtml/lib/api.js:91:45
    at traverse (/parcel-2-posthtml-playground/node_modules/posthtml/lib/api.js:105:26)
    at traverse (/parcel-2-posthtml-playground/node_modules/posthtml/lib/api.js:111:5)
    at traverse (/parcel-2-posthtml-playground/node_modules/posthtml/lib/api.js:105:17)
    at traverse (/parcel-2-posthtml-playground/node_modules/posthtml/lib/api.js:111:5)

It seems that there is the posthtml-md plugin which allows inline, but as far as I can see not external content and your plugin that supports external, but not inline content. Both of them implement a <markdown> tag, which makes it tricky to use them together.

Having a single plugin support both cases would be nice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions