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 block does not work well with templates #123

Closed
SylvainGuieu opened this issue Aug 25, 2022 · 2 comments
Closed

nested block does not work well with templates #123

SylvainGuieu opened this issue Aug 25, 2022 · 2 comments

Comments

@SylvainGuieu
Copy link

I have copied the block exemple from the documentation. One using a template and one without :

no color

::: block <!-- element style="background-color: red;" -->

everything inside this block has red background color

::: block <!-- element style="background-color: blue;" -->

blue

::: 

red

:::
no color

---
<!-- slide template="[[stpl-void]]" -->

no color

::: block <!-- element style="background-color: red;" -->

everything inside this block has red background color

::: block <!-- element style="background-color: blue;" -->

blue

::: 

red

:::
no color

The stpl-void template contains only <% content %> (for problem hunting purpose).

It seems that some opening div blocks are missing when using the template, see the comparaison between both :

<section  data-markdown><script type="text/template">

no color

<div class="block">

<!-- .element: style="background-color: red" -->

everything inside this block has red background color

<div class="block">

<!-- .element: style="background-color: blue" -->

blue

</div>



red

</div>


no color
</script></section><section  data-markdown><script type="text/template">

no color



blue

</div>



red

</div>


no color
</script></section>
@SylvainGuieu
Copy link
Author

SylvainGuieu commented Aug 25, 2022

Sorry, more on this :

<!-- slide template="[[stpl-void]]" -->

Outside a block

::: block 
A first block
:::

::: block 
A second block
:::

---


Outside a block

::: block 
A first block
:::

::: block 
A second block
:::

The first slide :
image
The Second :
image

However if I remove the space after "::: block" it works in both cases. Seems that a trailing space (or anything else like <!-- element ....) after block has an effect only when using content inside a template.

@MSzturc
Copy link
Owner

MSzturc commented Aug 26, 2022

will be fixed with next version

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

2 participants