micromark / micromark-extension-directive

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

Inline code block inside container directive causes parse error. #6

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.

ChristianMurphy commented 3 years ago

this looks like an accidental duplicate of #5? Closing in favor of the first.

Corvimae commented 3 years ago

Oh weird. Github gave me a 404 the first time so I assumed it failed, my bad 🤦‍♀️ .