-
Notifications
You must be signed in to change notification settings - Fork 58
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
Conflict with markdown-it-container #72
Comments
Hi, and thank you for reporting 👍
Which order do you configure the plugins? Attrs or containers first?
|
Attributes first, but I tested inverting the order and the result is the same. |
You can solve this by using custom renderers. I wanted the containers to behave as closely as possible to pandoc fenced_divs, so for me this worked (adapted from markdown-it/markdown-it-container#23):
One thing I couldn't make consistent: pandoc doesn't parse e.g. |
I've investigated this, and it seems to be an error in markdown-it-container, it does not correctly set the token Example:
gives the token stream
Note that |
I am using both extensions When combining both extensions, e.g.,
the The problem as described in post #1 is still present to me. I also tried the workaround proposed by @mb21 but it does not work in my setup. Since I really like both extensions, I hope there is another way of making both work together. Thanks in advance. |
When using this plugin with markdown-it container all the attrs for the elements inside get's merged with the attrs for the container unless there are more than one level of nested containers.
If I set attrs for a container, it get's inserted on the container attrs array as expected. (needs custom render function but that's a bug for the container plugin)
Example input:
Current output:
But if I set attrs on the child, the attrs are set on the container:
::: column {.is-8} # Some title here {.title} Lorem ipsum :::
It outputs:
Expected output:
When using nested containers it works as expected
:::: columns {.is-mobile} ::: column {.is-8} # lorem ipsum {.title} more lorem ipsum ::: ::::
outputs:
The text was updated successfully, but these errors were encountered: