You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
container directive do not work with fenced code blocks properly #25
I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Affected package
remark-directive@4.0.0
Steps to reproduce
When using remark-directive with containerDirective, nested directives inside fenced code blocks cause incorrect parsing. Specifically, the parser treats the inner ::: (inside a code block) as the closing marker for the outer container directive, leading to broken syntax trees and invalid output.
One way to solve it is to use a higher level outer container directive (for example, use four colons). However, the directiveToMarkdown plugin seems not able to recognize this problem and will produce three colons only, which will break the structure.
Actual behavior
Consider using this chain to parse markdown source code and stringify the mdast (which often used in code formatting):
Ah interesting.
That would go into mdast-util-directive. It should iterate over the internal lines, and not just look at nested deeper directives, but consider all lines that contain colons (and spaces and tabs) I think!
Activity
wooorm commentedon Jul 27, 2025
Ah interesting.
That would go into mdast-util-directive. It should iterate over the internal lines, and not just look at nested deeper directives, but consider all lines that contain colons (and spaces and tabs) I think!
wooorm commentedon Oct 30, 2026
thanks, released in
3.2.0!