Prism issues

Page used for documenting issues with PrismJS.

Current issues

<!DOCTYPE ā€¦> markup declarations

Tracked inĀ Prism issueĀ #2093.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE greeting [
  <!ELEMENT greeting (#PCDATA)>
  <!ELEMENT subject (#PCDATA)>
]>
<greeting>Hello, <subject>world</subject>!</greeting>

Resolved issues

<![CDATA[ā€¦]]> inĀ <script> orĀ <style>

<script type="application/javascript"><![CDATA[
let stuff;
alert("</script>");
]]></script>

<style type="text/css"><![CDATA[
.stuff {
	ā€¦
}
]]></style>

Should render similarly to:

<script type="application/javascript">
let stuff;
alert("<\/script>");
</script>

<style type="text/css">
.stuff {
	ā€¦
}
</style>

MDNĀ JSON vs PrismĀ JSON syntax highlighting

MDNĀ JSON

{ "Foo": "Bar" }

// MDN's broken JSON highlighter highlights JavaScript code:
function doStuff() {
  let stuff = null || undefined;
  return stuff || false;
}

PrismĀ JSON

{ "Foo": "Bar" }

// Prism's official JSON highlighter only highlights valid JSON keywords:
function() {
  let stuff = null || undefined;
  return stuff || false;
}