Using the highlight shortcode adds HTML paragraph tags to the highlighted output

Hi, using ths highlight shortcode like:

{{% highlight "python" %}}
for i in range(20):
  print i
{{% /highlight %}}

Actual rendered output contains paragraphs.

<p>for i in range(20):
  print i</p>

What am I missing?

Thanks

@spf13 we really should get a 0.13 out the door so I can stop answering this question.

You could either:

  1. Build 0.13 and replace {{% highlight “python” %}} with {{< highlight “python” >}} (and similar with the closing shortcode) (the new “no Markdown syntax”)
  2. Indent the code (inside the shortcode) with 4 spaces.

agree. Lets try for next week. I’ll put in the time needed.

Steve Franciaspf13.com@spf13

1 Like

Thanks. I am using HEAD, so should be fine. I am sure I missed the documentation where it says that the contents are markdown rendered?

It’s in the 0.13 doc, but it’s important to know that the LIVE doc is 0.12 - so if you run from master, you should spin up the docs locally.