micromark / micromark-extension-directive

micromark extension to support generic directives (`:cite[smith04]`)
https://unifiedjs.com
MIT License
29 stars 16 forks source link

Inline code block within container directive causes parser error. #5

Closed Corvimae closed 3 years ago

Corvimae commented 3 years ago

Subject of the issue

An inline code block inside a container directive causes the parser to fail.

:::card
The formula used is `stat / 255`.
:::
TypeError: undefined has no properties
    childrenToText directiveConverter.ts:11
    childrenToText directiveConverter.ts:11
    childrenToText directiveConverter.ts:11
    onDirective directiveConverter.ts:28
    overload index.js:27
    visit index.js:56
    visit index.js:67
    visitParents index.js:29
    visit index.js:22
    transform directiveConverter.ts:18
    wrapped wrap.js:25
    next index.js:57
    run index.js:31
    executor index.js:305
    run index.js:302
    pipelineRun index.js:27
    wrapped wrap.js:25
    next index.js:57
    done wrap.js:55
    then wrap.js:62
    wrapped wrap.js:45
    next index.js:57
    run index.js:31
    executor index.js:375
    process index.js:370
    processSync index.js:399

Your environment

Steps to reproduce

See subject.

Expected behavior

The container directive renders correctly.

Actual behavior

Parsing fails.

wooorm commented 3 years ago

childrenToText seems to come from your code?

Corvimae commented 3 years ago

... I'm dumb, you can close this.