# Zola 0.15 .md shortcode stopped working

**URL:** <https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099>\
**Category:** Support\
**Created:** [December 6, 2021, 3:01pm UTC](https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099 "2021-12-06T15:01:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![redFrik](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@redFrik](https://zola.discourse.group/u/redFrik)\
**Post date:** [December 6, 2021, 3:01pm UTC](https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099/1 "2021-12-06T15:01:59Z")

</div>

hi,  
just updated to v0.15 (from 0.14.1) and my code.md shortcode broke.

```auto
{%- set code = load_data(path = path, format = "plain") -%}
'''{%- if syntax -%}{{ syntax }}{% endif %}
{{ code }}
'''

```

(the three ’ above are backticks in the real file)

i use it like this…

`{{ code(path = "content/software/supercollider/pakt-februari/pakt29.scd", syntax = "supercollider") }}`

the weird thing is that when i put two or more of these shortcodes in the same content file, the resulting code blockas are all fragmented and broken. i also get ||ZOLA\_SC\_PLACEHOLDER|| at the bottom of the page - one for each additional {{ code… }.

any ideas? i tried simplifying the .md shortcode but anything i put in there results in a broken output **when two or more shortcode calls**.

thanks,  
\_f

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [December 6, 2021, 4:13pm UTC](https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099/2 "2021-12-06T16:13:12Z")

</div>

> [@redFrik](#):
>
> ||ZOLA\_SC\_PLACEHOLDER||

That’s the replacement text the shortcode parser inserts. I’ll add that as a test to figure out what’s happening. Can you paste an entire `.md` that fails?

---

<div class="post-metadata">

**Author:** ![redFrik](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@redFrik](https://zola.discourse.group/u/redFrik)\
**Post date:** [December 6, 2021, 4:42pm UTC](https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099/3 "2021-12-06T16:42:32Z")

</div>

sure, here’s a simple index.md that demonstrate the problem (macOS 10.14.6, rustc 1.57.0, zola 0.15.0)

```auto
+++

in_search_index = false

title = "ttest"

+++

ttest1

{{ code(path = "content/software/supercollider/pakt-februari/pakt29.scd", syntax = "supercollider") }}

ttest2

{{ code(path = "content/software/supercollider/pakt-februari/pakt29.scd", syntax = "supercollider") }}

```

templates/index.html is basically just… `<section>{{ section.content | safe }}</section>`

and templates/shortcodes/code.md is a file with only one line… `123`

the resulting html is…

```auto
<section><p>ttest1</p>
<p>123</p>
<p>123HOLDER||</p>
</section>

```

so the ttest2 line disappeard and the HOLDER|| thing looks wrong.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [December 6, 2021, 4:49pm UTC](https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099/4 "2021-12-06T16:49:54Z")

</div>

Thanks i’ll have a look soon. It looks like a 0.15.1 will be needed!

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [December 7, 2021, 7:23pm UTC](https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099/5 "2021-12-07T19:23:24Z")

</div>

That one was embarassing, can you try the next branch [Next version by Keats · Pull Request #1682 · getzola/zola · GitHub](https://github.com/getzola/zola/pull/1682) ?

---

<div class="post-metadata">

**Author:** ![redFrik](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@redFrik](https://zola.discourse.group/u/redFrik)\
**Post date:** [December 7, 2021, 8:02pm UTC](https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099/6 "2021-12-07T20:02:01Z")

</div>

yes, now with the next branch it seems to work. thanks a lot.  
also thanks for creating Zola. it’s great!

---

<div class="post-metadata">

**Author:** ![redFrik](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@redFrik](https://zola.discourse.group/u/redFrik)\
**Post date:** [December 7, 2021, 8:24pm UTC](https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099/7 "2021-12-07T20:24:43Z")

</div>

another small oddity that is also new in 0.15. (could be that this is a user error.)

if i in the test above change the name of the argument `syntax` to `lang`, the syntax highlighter fail with the warning: “_Warning: Highlight language en not found in…_”

i.e.

```auto
{{ code(path = "content/software/supercollider/pakt-februari/pakt29.scd", lang = "supercollider") }}

```

and the shortcode .md file…

```auto
'''{%- if lang -%}{{ lang }}{% endif %}
123
'''

```

so somehow the lang argument is overwritten with the language of the website “en”.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [December 7, 2021, 8:51pm UTC](https://zola.discourse.group/t/zola-0-15-md-shortcode-stopped-working/1099/8 "2021-12-07T20:51:45Z")

</div>

yep, `lang` is a reserved parameter of Zola that is passed to every template to identify the current language. You would need to name yours something different.
