# Known failures ▲ Prism

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

    #cs
    	#cs
    		foo()
    	#ce
    #ce

### 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 {
      &:extend(.inline);
      background: blue;
    }
    .a:extend(.b) {}

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

    foobar"param";

### 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

    ^if(
        $age>=4  # not too young
        && $age<=80  # and not too old
    )

### Null-ary predicates are not highlighted

    halt.
    trace.

    :- if(test1).
    section_1.
    :- elif(test2).
    section_2.
    :- elif(test3).
    section_3.
    :- else.
    section_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 `}`

    f"{'}'}"

### 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

    .page
      color = 5px + 9px

    !width = 13px
    .icon
      width = !width

### Selectors with pseudo classes are highlighted as property/value pairs

    a:hover
      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
    	(case-lambda
    		(() 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

    {{#switch:{{PAGENAME}}
    | 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''

# Themes

Some of our themes are not compatible with certain layouts.

## Coy

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

### Workarounds

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.