Skip to content

onCodeBlock should return a Promise #28

@KeithHenry

Description

@KeithHenry

onCodeBlock is sync, but as it's called from WASM code it will be asynchronous between workers.

Synchronous parsing of code blocks is fine for text, but fails for tools like Mermaid https://github.com/mermaid-js that render something using the code. Mermaid's render actions return a Promise and there's no way to resolve it synchronously.

To handle this, onCodeBlock should be async and support returning a Promise.

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