-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested containers don't work #6
Comments
http://spec.commonmark.org/0.25/#fenced-code-blocks Use the same principle as in fenced block for nested things - add more |
yeah it works! thanks! |
This shouldn't be the opposite ? Indeed, let's say I start my Markdown like this: ::: section
This will be a
long
long
long
SECTION
very
long
::: Then, within that ::: section1
This will be a
long
long
long
:::: section2
SECTION2 INSIDE SECTION1
:::::: section3
SECTION3 INSIDE SECTION2
:::::::section4
YAY, I don't need to go and modify previous elements
:::::::
::::::
::::
very
long
::: Is there a way to reverse this approach using |
http://spec.commonmark.org/0.25/#example-91 Use http://spec.commonmark.org/dingus/ or https://markdown-it.github.io/ to play with nested fenced blocks. This package works the same way. No, i do not plan to reverse border length for nested blocks. But nobody can prohibit you to create new plugin, based on this one's source. |
I try to make this input to work: ::::row
::::::::::col
col1
::::::::::
::::::::::col
col2
::::::::::
::::: which I think is visually more understandable. So I decided to deem the .use(require('markdown-it-container'), 'classname', {
validate: name => name.trim().length,
render: (tokens, idx) => {
if (tokens[idx].info.trim() !== "") { // if the token has info, then this is the start of a new div
return `<div class="${tokens[idx].info.trim()}">\n`;
} else { // if no info, then this is a closing div
return '</div>\n';
}
}
}); Translating that code with my markdown, should render as follow:
however it does not render this way, rather, here is the output:
clearly I am missing something, but I am afraid I can't see what: any idea ? :) |
@puzrin Thank you for your prompt reply. If you test this :
you will see it does NOT nest the fenced block correctly in Dingus, rather it escapes the sub-level |
It works as required - recognizes In your example, this is exact inner to show as text:
|
nested probably won't ever work. I see the source code.
the interesting thing is that |
Sorry I have been trying the nested div without success. Is this issue solved or not? I tried as follow:
|
Have you tried adding empty lines? This works for me.
|
Hello,
The nested containers seem to not work 😞
It displays
:::
afterE-mail: @email
and header container doesn't contain address, contact containers.Thanks
The text was updated successfully, but these errors were encountered: