Prism がコードを正しく強調表示しない珍しい特殊事例のリストです。
Prism が失敗する特定の特殊事例があります。このような事例は、正規表現ベースの構文ハイライターには常にあるものです。
ただし、Prism はそれに関してオープンかつ正直であるようにしています。ここでは、失敗がリストされていても、修正されないという意味ではありません。これはむしろ「既知のバグ」リストであり、単にバグのタイプが異なるだけです。
(* Nested block
(* comments
(* on more than
2 levels *)
are *)
not supported *)
#cs
#cs
foo()
#ce
#ce
{
if($1) {
if($2) {
}
}
} // <- Broken
%%
%%
/+ /+ /+ this does not work +/ +/ +/
q{ q{ q{ this does not work } } }
'#{:atom} <- this should not be highligted'
2 / 3 / 4
The box 1A is a container
`${ /* } */ a + b }`
`${ '}' }`
`${foo({ a: { b: { c: true } } })}`
@import "some file.less";
@import "@{themes}/tidal-wave.less";
nav ul {
&:extend(.inline);
background: blue;
}
.a:extend(.b) {}
foobar"param";
mov ax,1100_1000b
mov ax,1100_1000y
mov ax,0b1100_1000
mov ax,0y1100_1000
dd 1.222_222_222
# Doesn't work
# Does work
# Does work when prefixed with a space
^if(
$age>=4 # not too young
&& $age<=80 # and not too old
)
halt.
trace.
:- if(test1).
section_1.
:- elif(test2).
section_2.
:- elif(test3).
section_3.
:- else.
section_else.
:- endif.
"Foobar ${foo({
bar => {baz => 42}
baz => 42
})} <- broken"
{
または }
が含まれる文字列を含む補完式f"{'}'}"
\d .
+---------------+----------+
| column 1 | column 2 |
+--------------+-----------+
| **bold**? | *italic*? |
+--------------+-----------+
次のコードでは、インラインマークアップは強調表示されないはずです。
2 * x a ** b (* BOM32_* ` `` _ __ |
"*" '|' (*) [*] {*} <*> ‘*’ ‚*‘ ‘*‚ ’*’ ‚*’ “*” „*“ “*„ ”*” „*” »*« ›*‹ «*» »*» ›*›
/* Nested block
/* comments
are */
not supported */
|x| x + 1i;
.page
color = 5px + 9px
!width = 13px
.icon
width = !width
a:hover
text-decoration: underline
/* Nested block
/* comments
are */
not supported */
case-lambda
引数リストの最初の引数は、関数として強調表示されます(define plus
(case-lambda
(() 0)
((x) x)
((x y) (+ x y))
((x y z) (+ (+ x y) z))
(args (apply + args))))
/* Nested block
/* comments
are */
not supported */
ただし、HTML 内の Textile は問題ありません。
<strong>This _should_ work properly.</strong>
*But this is <em>definitely</em> broken.*
<div{% if foo %} class="bar"{% endif %}></div>
{{#switch:{{PAGENAME}}
| L'Aquila = No translation
| L = Not OK
| L'Aquila = Entity escaping
| L'Aquila = Numeric char encoding
}}
''Italic with '''bold''' inside''
テーマの中には、特定のレイアウトと互換性がないものもあります。
Coy のシャドウと背景は、float や flexbox レイアウトと組み合わせると、コードを正しく囲まない場合があります。
2 つ考えられる回避策があります
1 つ目は、pre
要素に display: flex-root;
を設定することです。これにより問題は修正されますが、flex-root
の ブラウザーサポートは限定的 です。
2 つ目は、pre
要素のスタイルに clear: both;
を追加することです。これにより問題は修正されますが、コードブロックと他の要素が重なった場合の動きが変わります。