Skip to content
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 shortcodes broken in flex objects content #114

Open
schliflo opened this issue Mar 21, 2022 · 5 comments
Open

Nested shortcodes broken in flex objects content #114

schliflo opened this issue Mar 21, 2022 · 5 comments

Comments

@schliflo
Copy link

My setup renders flex objects that have markdown content. The template looks like this

{{ object.markdown|shortcodes|markdown|raw }}

The following markdown

[div]
[div]
*test*
[/div]
[/div]

renders like this:

<div>
<div></div>
*test*
</div>
[/div]

Using the same markdown in the page content (not the flex object) it produces the correct/expected output:

<div >
<div >
<p><em>test</em></p>
</div>
</div>

The parser is set to regular like suggested here: #67 (comment)

@ricardo118
Copy link

@schliflo dont need |raw anymore with |markdown

@ricardo118
Copy link

ricardo118 commented Mar 29, 2022

does this work

{% set md = object.markdown|shortcodes|markdown %}

{{ md|markdown }}

@schliflo
Copy link
Author

does this work

{% set md = object.markdown|shortcodes|markdown %}

{{ md|markdown }}

Unfortunately this does not work.
I think the shortcode handling gets messed up before that.
The rendered result still lokks like in the example above. It has a stray closing shortcode tag and the div is closed too early as well.

@rhukster
Copy link
Member

Change the parser to regular.

@schliflo
Copy link
Author

Change the parser to regular.

The parser is already set to regular, thats the strange thing.
It works fine when using the exact same nested shorcode in the page content, just the flex content is bahiving this way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants