<?xml version="1.0" encoding="ISO-8859-1"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<country>Columbia</country>
<price>10.90</price>
<year>1985</year>
</cd>
</catalog>
this code doesn’t work with Prismatic
Right so next time I RTFM…….. Escaping is Code Escape option in the plugin…..
Still have little request tho. The escaping is not keeping the spacing to make the indentation nice. Any idea how to do that ?
I’m not sure about the spacing, it sort of depends on either Prism.js or Highlight.js, whichever one you have enabled. The only thing Prismatic plugin itself does is add the required scripts/styles for either; it does not add any of its own styles to front-end code.
Let me know if you have any further questions, glad to help however possible.
Currently using prism.js in the example they have on markup we can see the spacing kept.
Will play a bit on my test env to see if my theme mess around with it
Yeah if you need help with Prism.js, you may want to ask in the Prism.js help forum or similar. Thanks
Found the issue, was my theme default nineteen wordpress worked.
One I’ve noted is if you don’t select a language and there is no other block then it’s not loaded.
Also if we can transform from standard pre or code block to prismatic would be great for migration
Otherwise loving it 😀
Awesome, glad you got it sorted @neodolphin.
For this: “if you don’t select a language and there is no other block then it’s not loaded.” That is correct and intended functionality to help ensure optimal loading of scripts (focus on performance).
And for this: “if we can transform from standard pre or code block to prismatic would be great for migration” It is a good idea, I will see what I can do 🙂
Yeh now look neat 8)
I noticed a language-none would cool to be able to select it so the CSS is still loaded because otherwise it’s a plain pre.
Ah yes good idea. I know that highlight.js provides a couple of classes that do something similar. I will see about adding such a class for prism.js.
Just to follow up with this, the next version of Prismatic you can disable syntax highlighting while also loading the Prism.js stylesheet by adding a class of language-none. Thank you for the suggestion, @neodolphin.