How can I highlight shortcode?

I want to display some shortcode that is active on other pages. This one is not working and will execute the code, or break the page:

{{< highlight go-html-template >}}
{{< graphcomment >}}
{{< /highlight >}}

What is the correct way to write it?

You’ll need to escape the shortcode code that you want to show verbatim:

{{< highlight go-html-template >}}
{{</* graphcomment */>}}
{{< /highlight >}}
2 Likes

Oh, I did that, well, nearly:

Does NOT work:

{{<highlight go-html-template>}}
{< /* graphcomment */ >}}
{{</highlight>}}

Works:

 {{<highlight go-html-template>}} 
 {{</* graphcomment */>}} 
 {{</highlight >}}

Somehow the extra space makes an error.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.