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>

Tracked in Prism issue #1656 (PR #1660).

<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

Tracked in bug 1520004 (Kuma PR #5189).

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;
}