如何在<pre> using crayon syntax highlighter in wordpress?

时间:2019-01-18 18:09:31

标签: php wordpress syntax-highlighting visual-composer

I am using the crayon syntax highlighter for syntax highlighting in wordpress blog. Problem is it print all of the code in single line with the
tag printed itself in the syntax instead of add the new line please help.

My Blog Page My blog page

Problem Problem

Code creating problem that needs to debug

<pre class="wp-block-preformatted lang:python decode:true" title="Shallow copy example"> 
import copy<br> l1 = [ [1,2,3], [4,5,6] ]<br> 
l2 = copy.deepcopy(l1)<br> print(l2) # [ [1,2,3], [4,5,6] ]<br>
l1.append([7,8,9])<br> print(l1) #[ [1,2,3], [4,5,6], [7,8,9] ]<br> 
print(l2) #[ [1,2,3], [4,5,6]]<br> 
#now change in the old property of l1<br> 
l1[0][1] = “aa”<br> 
print(l1) #[ [1,”aa”,3], [4,5,6], [7,8,9] ]<br> 
print(l2) #[ [1,”2”,3], [4,5,6] ] so, here we see neither the new property is reflected in #this object nor the change in the first property reflected i,e,”aa”, l2[0][1] is 2 not #“aa”. </pre>

It should print like this code

Expected format of the visual syntax Expected output like this

0 个答案:

没有答案