remark icon indicating copy to clipboard operation
remark copied to clipboard

{{content}} macro not compatible with user-defined css class

Open jdumas opened this issue 8 years ago • 2 comments

When using either a layout: true or the template option, the macro {{content}} works well to append content in arbitrary places in the custom template slide. However, as soon as I try to use a custom css class, e.g. by defining .red { color: red } in my css header, then it gets rendered as ,[object Object] in the slideshow. It would be nice to be able to combine both.

jdumas avatar Jan 24 '17 18:01 jdumas

Hi @jdumas, is this similar to #460 or a totally separate problem?

abelards avatar Dec 20 '19 14:12 abelards

Issue still exists, here is a test case :

Seems to be related to #603, maybe #460 as well.

<textarea id="source">
layout: true
name: top

layout top

.content[
{{content}}
]

layout bottom

---
template: top

top-level text works

- item a
- item b

.styled[
- item xa
- item xb
]

</textarea>

Output:

<div class="remark-slide-content hljs-default"><p>layout top</p>
<div class="content"><p>top-level text works</p>
<ul>
<li>item a</li>
<li>item b</li>
</ul>
<p>,[object Object],</p>
</div>

<p>layout bottom</p><div class="remark-slide-number">1 / 1</div></div>

mvdkwast avatar Apr 18 '21 08:04 mvdkwast