Known failures

A list of rare edge cases where Prism highlights code incorrectly.

There are certain edge cases where Prism will fail. There are always such cases in every regex-based syntax highlighter.
However, Prism dares to be open and honest about them. If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.

Comments only support one level of nesting

(* Nested block
	(* comments
		(* on more than
		2 levels *)
	are *)
not supported *)

Nested block comments


Two levels of nesting inside C section

	if($1) {
		if($2) {

} // <- Broken

Comments only support one level of nesting

/+ /+ /+ this does not work +/ +/ +/

Token strings only support one level of nesting

q{ q{ q{ this does not work } } }

String interpolation in single-quoted strings

'#{:atom} <- this should not be highligted'

Two divisions on the same line

2 / 3 / 4

Names starting with a number

The box 1A is a container

String interpolation containing a closing brace

`${ /* } */ a + b }`
`${ '}' }`

String interpolation with deeply nested braces

`${foo({ a: { b: { c: true } } })}`

At-rules looking like variables

@import "some file.less";

At-rules containing interpolation

@import "@{themes}/tidal-wave.less";

extend is not highlighted consistently

nav ul {
  background: blue;
.a:extend(.b) {}

Functions with a single string parameter not using parentheses are not highlighted


Numbers with underscores

mov     ax,1100_1000b
mov     ax,1100_1000y
mov     ax,0b1100_1000
mov     ax,0y1100_1000

dd    1.222_222_222

Code block starting with a comment

# Doesn't work
# Does work
 # Does work when prefixed with a space

Comments inside expressions break literals and operators

    $age>=4  # not too young
    && $age<=80  # and not too old

Null-ary predicates are not highlighted


:- if(test1).
:- elif(test2).
:- elif(test3).
:- else.
:- endif.

More than one level of nested braces inside interpolation

"Foobar ${foo({
    bar => {baz => 42}
    baz => 42
})} <- broken"

Interpolation expressions containing strings with { or }


The global context is highlighted as a verb

\d .

Nothing is highlighted inside table cells

| column 1     | column 2  |
| **bold**?    | *italic*? |

The inline markup recognition rules are not as strict as they are in the spec

No inline markup should be highlighted in the following code.

2 * x a ** b (* BOM32_* ` `` _ __ |
"*" '|' (*) [*] {*} <*> ‘*’ ‚*‘ ‘*‚ ’*’ ‚*’ “*” „*“ “*„ ”*” „*” »*« ›*‹ «*» »*» ›*›

Nested block comments

/* Nested block
	/* comments
	are */
not supported */

Delimiters of parameters for closures that don't use braces

|x| x + 1i;

Deprecated Sass syntax is not supported

  color = 5px + 9px

!width = 13px
  width = !width

Selectors with pseudo classes are highlighted as property/value pairs

  text-decoration: underline

Nested block comments

/* Nested block
	/* comments
	are */
not supported */

The first argument of case-lambda argument lists are highlighted as functions

(define plus
		(() 0)
		((x) x)
		((x y) (+ x y))
		((x y z) (+ (+ x y) z))
		(args (apply + args))))

Nested block comments

/* Nested block
	/* comments
	are */
not supported */

HTML inside Textile is not supported

But Textile inside HTML should be just fine.

<strong>This _should_ work properly.</strong>
*But this is <em>definitely</em> broken.*

Tag containing Twig is not highlighted

<div{% if foo %} class="bar"{% endif %}></div>

Nested magic words are not supported

| L'Aquila = No translation
| L = Not OK
| L'Aquila = Entity escaping
| L'Aquila = Numeric char encoding

Nesting of bold and italic is not supported

''Italic with '''bold''' inside''


Some of our themes are not compatible with certain layouts.


Coy's shadows and background might not wrap around the code correctly if combined with float of flexbox layouts.


There are 2 possible workarounds:

The first workaround is setting display: flex-root; for the pre element. This will fix the issue but flex-root has limited browser support.

The second is adding clear: both; to the style of the pre element. This will fix the issue but it will change the way code blocks behave when overlapping with other elements.