Known failure page (#1876)

This PR adds a known failures page. This resolves #1750.

The known failures are moved from the example pages.
(I also updated all example pages with invalid HTML.)

Some known failures were actually fixed in the meantime but never updated, so I removed a few. Those were: 
- Handlebars
- Markdown's nested bold-italic
- Smarty
- Textile's "Nested styles are only partially supported"

### Screenshot

<details>

![image](https://user-images.githubusercontent.com/20878432/56849438-7eca3200-68f4-11e9-9dc3-bf0256be8d1e.png)

</details>
This commit is contained in:
Michael Schmidt 2019-06-30 04:19:54 +02:00 committed by James DiGioia
parent a16d4a2513
commit 36a5fa0eb8
65 changed files with 539 additions and 543 deletions

View File

@ -93,7 +93,7 @@ class B extends A {}</code></pre>
var gradientBmp:BitmapData = new BitmapData(256, 10, false, 0);
gradientBmp.draw(gradient);
RLUT = new Array(); GLUT = new Array(); BLUT = new Array();
for (var i:int = 0; i < 256; i++) {
for (var i:int = 0; i &lt; 256; i++) {
var pixelColor:uint = gradientBmp.getPixel(i, 0);
//I drew the gradient backwards, so sue me
RLUT[256-i] = pixelColor & 0xff0000;
@ -130,4 +130,4 @@ class B extends A {}</code></pre>
colorBmp.paletteMap(sourceBmp, sourceBmp.rect, O, RLUT, GLUT, BLUT, null);
}
}
}</code></pre>
}</code></pre>

View File

@ -24,18 +24,3 @@ text 1 thru 5 of "Bring me the mouse."
set averageTemp to 63 as degrees Fahrenheit
set circleArea to (pi * 7 * 7) as square yards
</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Comments only support one level of nesting</h3>
<pre><code>(* Nested block
(* comments
(* on more than
2 levels *)
are *)
not supported *)</code></pre>

View File

@ -14,7 +14,7 @@ are supported too."</code></pre>
false;</code></pre>
<h2>Operators</h2>
<pre><code>a < b;
<pre><code>a &lt; b;
c &amp;&amp; d;</code></pre>
<h2>Full example</h2>
@ -28,7 +28,7 @@ int piezo = 8;
* runs once before everyhing else
*/
void setup() {
pinMode(piezo, OUTPUT);
pinMode(piezo, OUTPUT);
}
/**

View File

@ -88,7 +88,7 @@ Dolor::
<pre><code>[cols="e,m,^,>s",width="25%"]
|============================
|1 >s|2 |3 |4
^|5 2.2+^.^|6 .3+<.>m|7
^|5 2.2+^.^|6 .3+&lt;.>m|7
^|8
|9 2+>|10
|============================</code></pre>
@ -101,4 +101,4 @@ This is an _emphasis_
<h2>Attribute entries</h2>
<pre><code>:Author Initials: JB
{authorinitials}
:Author Initials!:</code></pre>
:Author Initials!:</code></pre>

View File

@ -1,17 +1,17 @@
<h2>Comments</h2>
<pre><code><%-- This is a comment --%>
<%-- This is a
<pre><code>&lt;%-- This is a comment --%>
&lt;%-- This is a
multi-line comment --%></code></pre>
<h2>Page directives</h2>
<pre><code><%@ Page Title="Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="WingtipToys.ProductList" %>
<pre><code>&lt;%@ Page Title="Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductList.aspx.cs" Inherits="WingtipToys.ProductList" %>
</code></pre>
<h2>Directive tag</h2>
<pre><code><%: Page.Title %>
&lt;a href="ProductDetails.aspx?productID=<%#:Item.ProductID%>">
<pre><code>&lt;%: Page.Title %>
&lt;a href="ProductDetails.aspx?productID=&lt;%#:Item.ProductID%>">
&lt;span>
<%#:Item.ProductName%>
&lt;%#:Item.ProductName%>
&lt;/span></code></pre>
<h2>Highlighted C# inside scripts</h2>
@ -19,18 +19,18 @@ multi-line comment --%></code></pre>
On this page, check C# <strong>before</strong> checking ASP.NET should make
the example below work properly.</p>
<pre><code>&lt;script runat="server">
// The following variables are visible to all procedures
// within the script block.
String str;
int i;
int i2;
// The following variables are visible to all procedures
// within the script block.
String str;
int i;
int i2;
int DoubleIt(int inpt)
{
// The following variable is visible only within
// the DoubleIt procedure.
int factor = 2;
int DoubleIt(int inpt)
{
// The following variable is visible only within
// the DoubleIt procedure.
int factor = 2;
return inpt * factor;
}
&lt;/script></code></pre>
return inpt * factor;
}
&lt;/script></code></pre>

View File

@ -19,7 +19,7 @@ if f_path =
return
if f_class = #32770 ; It's a dialog.
{
if f_Edit1Pos <> ; And it has an Edit1 control.
if f_Edit1Pos &lt;> ; And it has an Edit1 control.
{
; Activate the window so that if the user is middle-clicking
; outside the dialog, subsequent clicks will also work:
@ -37,7 +37,7 @@ if f_class = #32770 ; It's a dialog.
}
else if f_class in ExploreWClass,CabinetWClass ; In Explorer, switch folders.
{
if f_Edit1Pos <> ; And it has an Edit1 control.
if f_Edit1Pos &lt;> ; And it has an Edit1 control.
{
ControlSetText, Edit1, %f_path%, ahk_id %f_window_id%
; Tekl reported the following: "If I want to change to Folder L:\folder
@ -65,4 +65,4 @@ else if f_class = ConsoleWindowClass ; In a console window, CD to that directory
; 2) It's a supported type but it lacks an Edit1 control to facilitate the custom
; action, so instead do the default action below.
Run, Explorer %f_path% ; Might work on more systems without double quotes.
return</code></pre>
return</code></pre>

View File

@ -36,17 +36,3 @@ For $i = 1 To 10
EndIf
MsgBox($MB_SYSTEMMODAL, "", "The value of $i is: " & $i)
Next</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Nested block comments</h3>
<pre><code>#cs
#cs
foo()
#ce
#ce</code></pre>

View File

@ -21,7 +21,7 @@ args=("$@")
echo ${args[0]} ${args[1]} ${args[2]}</code></pre>
<h2>Keywords</h2>
<pre><code>for (( i=0;i<$ELEMENTS;i++)); do
<pre><code>for (( i=0;i&lt;$ELEMENTS;i++)); do
echo ${ARRAY[${i}]}
done
while read LINE; do
@ -46,4 +46,4 @@ sudo dpkg -i vagrant_1.7.2_x86_64.deb
git pull origin master
sudo gpg --refresh-keys; sudo apt-key update; sudo rm -rf /var/lib/apt/{lists,lists.old}; sudo mkdir -p /var/lib/apt/lists/partial; sudo apt-get clean all; sudo apt-get update</code></pre>
sudo gpg --refresh-keys; sudo apt-key update; sudo rm -rf /var/lib/apt/{lists,lists.old}; sudo mkdir -p /var/lib/apt/lists/partial; sudo apt-get clean all; sudo apt-get update</code></pre>

View File

@ -57,7 +57,7 @@ DO
CALL PrintSomeStars(NumStars)
DO
INPUT "Do you want more stars? ", Answer$
LOOP UNTIL Answer$ <> ""
LOOP UNTIL Answer$ &lt;> ""
Answer$ = LEFT$(Answer$, 1)
LOOP WHILE UCASE$(Answer$) = "Y"
PRINT "Goodbye "; UserName$
@ -66,4 +66,4 @@ SUB PrintSomeStars (StarCount)
REM This procedure uses a local variable called Stars$
Stars$ = STRING$(StarCount, "*")
PRINT Stars$
END SUB</code></pre>
END SUB</code></pre>

View File

@ -50,7 +50,7 @@ int yylex(void);
string* op_val;
}
%start input
%start input
%token &lt;int_val> INTEGER_LITERAL
%type &lt;int_val> exp
@ -74,7 +74,7 @@ int yyerror(string s)
{
extern int yylineno; // defined and maintained in lex.c
extern char *yytext; // defined and maintained in lex.c
cerr &lt;&lt; "ERROR: " &lt;&lt; s &lt;&lt; " at symbol \"" &lt;&lt; yytext;
cerr &lt;&lt; "\" on line " &lt;&lt; yylineno &lt;&lt; endl;
exit(1);
@ -84,21 +84,3 @@ int yyerror(char *s)
{
return yyerror(string(s));
}</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Two levels of nesting inside C section</h3>
<pre><code>{
if($1) {
if($2) {
}
}
} // <- Broken
%%
%%</code></pre>

View File

@ -7,15 +7,15 @@
>+++ Add 3 to Cell #3
>+++ Add 3 to Cell #4
>+ Add 1 to Cell #5
<<<<- Decrement the loop counter in Cell #1
&lt;&lt;&lt;&lt;- Decrement the loop counter in Cell #1
] Loop till Cell #1 is zero; number of iterations is 4
>+ Add 1 to Cell #2
>+ Add 1 to Cell #3
>- Subtract 1 from Cell #4
>>+ Add 1 to Cell #6
[<] Move back to the first zero cell you find; this will
[&lt;] Move back to the first zero cell you find; this will
be Cell #1 which was cleared by the previous loop
<- Decrement the loop Counter in Cell #0
&lt;- Decrement the loop Counter in Cell #0
] Loop till Cell #0 is zero; number of iterations is 8
The result of this is:
@ -27,11 +27,11 @@ Pointer : ^
>---. Subtract 3 from Cell #3 to get 101 which is 'e'
+++++++..+++. Likewise for 'llo' from Cell #3
>>. Cell #5 is 32 for the space
<-. Subtract 1 from Cell #4 for 87 to give a 'W'
<. Cell #3 was set to 'o' from the end of 'Hello'
&lt;-. Subtract 1 from Cell #4 for 87 to give a 'W'
&lt;. Cell #3 was set to 'o' from the end of 'Hello'
+++.------.--------. Cell #3 for 'rl' and 'd'
>>+. Add 1 to Cell #5 gives us an exclamation point
>++. And finally a newline from Cell #6</code></pre>
<h2>One-line example</h2>
<pre><code>++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.</code></pre>
<pre><code>++++++++[>++++[>++>+++>+++>+&lt;&lt;&lt;&lt;-]>+>+>->>+[&lt;]&lt;-]>>.>---.+++++++..+++.>>.&lt;-.&lt;.+++.------.--------.>>+.>++.</code></pre>

View File

@ -300,7 +300,7 @@ function check_scan(c: connection, established: bool, reverse: bool): bool
# because c might not correspond to an active connection (which
# causes the function to fail).
if ( suppress_UDP_scan_checks &&
service >= 0/udp && service <= 65535/udp )
service >= 0/udp && service &lt;= 65535/udp )
return F;
if ( service in skip_services && ! outbound )
@ -343,8 +343,8 @@ function check_scan(c: connection, established: bool, reverse: bool): bool
empty_bs_table;
}
if ( ++distinct_backscatter_peers[orig][resp] <= 2 &&
# The test is <= 2 because we get two check_scan()
if ( ++distinct_backscatter_peers[orig][resp] &lt;= 2 &&
# The test is &lt;= 2 because we get two check_scan()
# calls, once on connection attempt and once on
# tear-down.
@ -380,7 +380,7 @@ function check_scan(c: connection, established: bool, reverse: bool): bool
pre_distinct_peers[orig] = set();
add pre_distinct_peers[orig][resp];
if ( |pre_distinct_peers[orig]| < addr_scan_trigger )
if ( |pre_distinct_peers[orig]| &lt; addr_scan_trigger )
ignore = T;
}
@ -462,7 +462,7 @@ function check_scan(c: connection, established: bool, reverse: bool): bool
}
# Check for low ports.
if ( activate_priv_port_check && ! outbound && service < 1024/tcp &&
if ( activate_priv_port_check && ! outbound && service &lt; 1024/tcp &&
service !in troll_skip_service )
{
if ( orig !in distinct_low_ports ||
@ -559,7 +559,7 @@ function thresh_check(v: vector of count, idx: table[addr] of count,
return F;
}
if ( idx[orig] <= |v| && n >= v[idx[orig]] )
if ( idx[orig] &lt;= |v| && n >= v[idx[orig]] )
{
++idx[orig];
return T;
@ -578,7 +578,7 @@ function thresh_check_2(v: vector of count, idx: table[addr, addr] of count,
return F;
}
if ( idx[orig,resp] <= |v| && n >= v[idx[orig, resp]] )
if ( idx[orig,resp] &lt;= |v| && n >= v[idx[orig, resp]] )
{
++idx[orig,resp];
return T;
@ -642,4 +642,4 @@ event bro_done()
for ( orig in distinct_low_ports )
lowport_summary(distinct_low_ports, orig);
}
</code></pre>
</code></pre>

View File

@ -16,7 +16,7 @@ main(int argc, char *argv[])
{
int c;
printf("Number of command line arguments passed: %d\n", argc);
for ( c = 0 ; c < argc ; c++)
for ( c = 0 ; c &lt; argc ; c++)
printf("%d. Command line argument passed is %s\n", c+1, argv[c]);
return 0;
}</code></pre>
}</code></pre>

View File

@ -255,8 +255,8 @@ keymap ; => {:a 1, :b 2, :c 3}
; The "Thread-first" macro (->) inserts into each form the result of
; the previous, as the first argument (second item)
(->
{:a 1 :b 2}
(->
{:a 1 :b 2}
(assoc :c 3) ;=> (assoc {:a 1 :b 2} :c 3)
(dissoc :b)) ;=> (dissoc (assoc {:a 1 :b 2} :c 3) :b)
@ -275,7 +275,7 @@ keymap ; => {:a 1, :b 2, :c 3}
; Result: [1 3 5 7 9]
; When you are in a situation where you want more freedom as where to
; put the result of previous data transformations in an
; put the result of previous data transformations in an
; expression, you can use the as-> macro. With it, you can assign a
; specific name to transformations' output and use it as a
; placeholder in your chained expressions:
@ -365,7 +365,7 @@ keymap ; => {:a 1, :b 2, :c 3}
(swap! my-atom assoc :b 2) ; Sets my-atom to the result of (assoc {:a 1} :b 2)
; Use '@' to dereference the atom and get the value
my-atom ;=> Atom<#...> (Returns the Atom object)
my-atom ;=> Atom&lt;#...> (Returns the Atom object)
@my-atom ; => {:a 1 :b 2}
; Here's a simple counter using an atom
@ -383,4 +383,4 @@ my-atom ;=> Atom<#...> (Returns the Atom object)
; Other STM constructs are refs and agents.
; Refs: http://clojure.org/refs
; Agents: http://clojure.org/agents</code></pre>
; Agents: http://clojure.org/agents</code></pre>

View File

@ -32,7 +32,7 @@ vector&lt;int> pick_vector_with_biggest_fifth_element(
vector&lt;int> left,
vector&lt;int> right
){
if( (left[5]) < (right[5]) ){
if( (left[5]) &lt; (right[5]) ){
return( right );
};
// else
@ -40,18 +40,18 @@ vector&lt;int> pick_vector_with_biggest_fifth_element(
}
int vector_demo(void){
cout << "vector demo" << endl;
cout &lt;&lt; "vector demo" &lt;&lt; endl;
vector&lt;int> left(7);
vector&lt;int> right(7);
left[5] = 7;
right[5] = 8;
cout << left[5] << endl;
cout << right[5] << endl;
cout &lt;&lt; left[5] &lt;&lt; endl;
cout &lt;&lt; right[5] &lt;&lt; endl;
vector&lt;int> biggest(
pick_vector_with_biggest_fifth_element( left, right )
);
cout << biggest[5] << endl;
cout &lt;&lt; biggest[5] &lt;&lt; endl;
return 0;
}

View File

@ -252,16 +252,3 @@ void main(char[][] args) // 'void' here means return 0 by default.
assert(_totalc >= _argc);
}
}</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Comments only support one level of nesting</h3>
<pre><code>/+ /+ /+ this does not work +/ +/ +/</code></pre>
<h3>Token strings only support one level of nesting</h3>
<pre><code>q{ q{ q{ this does not work } } }</code></pre>

View File

@ -450,13 +450,3 @@ send pid, {:circle, 2}
# The shell is also a process, you can use `self` to get the current pid
self() #=> #PID&lt;0.27.0></code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>String interpolation in single-quoted strings</h3>
<pre><code>'#{:atom} &lt;- this should not be highligted'</code></pre>

View File

@ -8,7 +8,7 @@ on multiple lines */</code></pre>
<h2>Full example</h2>
<pre><code>if(instance_exists(_inst) || _inst==global){
if(_delay<=0){
if(_delay&lt;=0){
_time+=1;
if(_time&lt;_duration){
event_user(0);

View File

@ -41,7 +41,7 @@ string`
string"</code></pre>
<h2>Functions</h2>
<pre><code>func(a, b int, z float64) bool { return a*b < int(z) }</code></pre>
<pre><code>func(a, b int, z float64) bool { return a*b &lt; int(z) }</code></pre>
<h2>Full example</h2>
<pre><code>package main
@ -52,7 +52,7 @@ func sum(a []int, c chan int) {
for _, v := range a {
sum += v
}
c <- sum // send sum to c
c &lt;- sum // send sum to c
}
func main() {
@ -61,8 +61,8 @@ func main() {
c := make(chan int)
go sum(a[:len(a)/2], c)
go sum(a[len(a)/2:], c)
x, y := <-c, <-c // receive from c
x, y := &lt;-c, &lt;-c // receive from c
fmt.Println(x, y, x+y)
}
</code></pre>
</code></pre>

View File

@ -81,13 +81,3 @@ class Distribution implements Distributable {
assert 4 / 2 == 2
}
}</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Two divisions on the same line</h3>
<pre><code>2 / 3 / 4</code></pre>

View File

@ -21,7 +21,7 @@ but this is not
%html{html_attrs('fr-fr')}
%div[@user, :greeting]
%img
%pre><
%pre>&lt;
foo
bar
%img
@ -76,4 +76,4 @@ On this page, check CoffeeScript <strong>before</strong> checking Haml should ma
the example below work properly.</p>
<pre><code>%script
:coffee
console.log 'This is coffee script'</code></pre>
console.log 'This is coffee script'</code></pre>

View File

@ -29,13 +29,3 @@
This should probably work...
{{/block-with-hyphens}}
</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Handlebars tag in the middle of an HTML tag</h3>
<pre><code>&lt;div{{#if test}} class="test"{{/if}}>&lt;/div></code></pre>

View File

@ -28,7 +28,7 @@ comment -}</code></pre>
wantReadableHandle_ "Data.ByteString.hGetLine" h $
\ h_@Handle__{haByteBuffer} -> do
flushCharReadBuffer h_
buf <- readIORef haByteBuffer
buf &lt;- readIORef haByteBuffer
if isEmptyBuffer buf
then fill h_ buf 0 []
else haveBuf h_ buf 0 []
@ -36,7 +36,7 @@ comment -}</code></pre>
fill h_@Handle__{haByteBuffer,haDevice} buf len xss =
len `seq` do
(r,buf') <- Buffered.fillReadBuffer haDevice buf
(r,buf') &lt;- Buffered.fillReadBuffer haDevice buf
if r == 0
then do writeIORef haByteBuffer buf{ bufR=0, bufL=0 }
if len > 0
@ -48,9 +48,9 @@ comment -}</code></pre>
buf@Buffer{ bufRaw=raw, bufR=w, bufL=r }
len xss =
do
off <- findEOL r w raw
off &lt;- findEOL r w raw
let new_len = len + off - r
xs <- mkPS raw r off
xs &lt;- mkPS raw r off
-- if eol == True, then off is the offset of the '\n'
-- otherwise off == w and the buffer is now empty.
@ -66,7 +66,7 @@ comment -}</code></pre>
findEOL r w raw
| r == w = return w
| otherwise = do
c <- readWord8Buf raw r
c &lt;- readWord8Buf raw r
if c == fromIntegral (ord '\n')
then return r -- NB. not r+1: don't include the '\n'
else findEOL (r+1) w raw
@ -77,4 +77,4 @@ mkPS buf start end =
withRawBuffer buf $ \pbuf -> do
copyBytes p (pbuf `plusPtr` start) len
where
len = end - start</code></pre>
len = end - start</code></pre>

View File

@ -159,13 +159,3 @@ The player wears a bathing outfit. The description of the bathing outfit is "Sty
Instead of taking off the outfit: say "What odd ideas come into your head sometimes!"
Test me with "fill glass / empty absinthe into lake / fill glass / swim / drink lake / drink / x water / x lake". </code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Names starting with a number</h3>
<pre><code>The box 1A is a container</code></pre>

View File

@ -34,7 +34,7 @@ NB. interchange two rows of a matrix,
NB. multiply a row by a constant,
NB. and add a multiple of one row to another:
E1=: <@] C. [
E1=: &lt;@] C. [
E2=: f`g`[}
E3=: F`g`[}
f=: {:@] * {.@] { [
@ -56,4 +56,4 @@ quicksort=: verb define
<pre><code>NB. Implementation of quicksort (tacit programming)
quicksort=: (($:@(&lt;#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1&lt;#)</code></pre>
quicksort=: (($:@(&lt;#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1&lt;#)</code></pre>

View File

@ -39,8 +39,8 @@ public class Life {
public static boolean[][] gen(){
boolean[][] grid = new boolean[10][10];
for(int r = 0; r < 10; r++)
for(int c = 0; c < 10; c++)
for(int r = 0; r &lt; 10; r++)
for(int c = 0; c &lt; 10; c++)
if( Math.random() > 0.7 )
grid[r][c] = true;
return grid;

View File

@ -64,17 +64,3 @@ import { foo as bar } from "file.js"
multiple lines.`
`40 + 2 = ${ 40 + 2 }`
`The squares of the first 3 natural integers are ${[for (x of [1,2,3]) x*x].join(', ')}`</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>String interpolation containing a closing brace</h3>
<pre><code>`${ /* } */ a + b }`
`${ '}' }`</code></pre>
<h3>String interpolation with deeply nested braces</h3>
<pre><code>`${foo({ a: { b: { c: true } } })}`</code></pre>

View File

@ -60,7 +60,7 @@ interface extender AuthInterfaceExtender {
OneWay: *(AuthenticationData)
}
service SubService
service SubService
{
Interfaces: NetInterface
@ -92,9 +92,9 @@ inputPort In {
.debug.showContent = true
}
Interfaces: NetInterface
Aggregates: SubService,
Aggregates: SubService,
LoggerService
Redirects: A => SubService,
Redirects: A => SubService,
B => SubService
}
@ -105,11 +105,11 @@ cset {
execution{ concurrent }
define netmodule {
if( request.load == 0 || request.load < 1 &&
request.load <= 2 || request.load >= 3 &&
if( request.load == 0 || request.load &lt; 1 &&
request.load &lt;= 2 || request.load >= 3 &&
request.load > 4 || request.load%4 == 2
) {
scope( scopeName ) {
scope( scopeName ) {
// inline comment
install( MyFault => println@Console( "Something \"Went\" Wrong" + ' but it\'s ok' )() );
/*
@ -127,9 +127,9 @@ define netmodule {
with( node ){
while( .load != 100 ) {
.load++
}
}
}
}
}
}
}
@ -159,4 +159,4 @@ main
}
until
[ quit() ]{ exit }
}</code></pre>
}</code></pre>

View File

@ -48,23 +48,3 @@ comment */</code></pre>
@{property}: #0ee;
background-@{property}: #999;
}</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>At-rules looking like variables</h3>
<pre><code>@import "some file.less";</code></pre>
<h3>At-rules containing interpolation</h3>
<pre><code>@import "@{themes}/tidal-wave.less";</code></pre>
<h3>extend is not highlighted consistently</h3>
<pre><code>nav ul {
&:extend(.inline);
background: blue;
}
.a:extend(.b) {}</code></pre>

View File

@ -77,13 +77,3 @@ function song(n)
io.write(line1(i), line2(i), line3(i - 1), "\n")
end
end</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Functions with a single string parameter not using parentheses are not highlighted</h3>
<pre><code>foobar"param";</code></pre>

View File

@ -19,7 +19,7 @@ edit : $(objects)
$(objects) : defs.h
%oo: $$< $$^ $$+ $$*
%oo: $$&lt; $$^ $$+ $$*
foo : bar/lose
cd $(@D) && gobble $(@F) > ../$@</code></pre>
@ -260,4 +260,4 @@ tar.zoo: $(SRCS) $(AUX)
> tmp.dir/$$X ; done
cd tmp.dir ; zoo aM ../tar.zoo *
-rm -rf tmp.dir
</code></pre>
</code></pre>

View File

@ -67,20 +67,3 @@ is not allowed__
> Containing &lt;strong>raw HTML&lt;/strong>
&lt;p>*Italic text inside HTML tag*&lt;/p></code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Nesting of elements is not fully supported</h3>
<pre><code>_ **bold** inside italic DOESN'T work _
__ but *italic* inside bold DOES work __
[Link partially *italic* DOESN'T work](http://example.com)
_ [But link inside italic DOES work](http://example.com) _
[Link partially **bold** DOESN'T work](http://example.com)
__ [But link inside bold DOES work](http://example.com) __</code></pre>

View File

@ -40,7 +40,7 @@ switch dayString
end
n = 1;
nFactorial = 1;
while nFactorial < 1e100
while nFactorial &lt; 1e100
n = n + 1;
nFactorial = nFactorial * n;
end</code></pre>
@ -49,4 +49,4 @@ end</code></pre>
<pre><code>q = integral(sqr,0,1);
y = parabola(x)
mygrid = @(x,y) ndgrid((-x:x/c:x),(-y:y/c:y));
[x,y] = mygrid(pi,2*pi);</code></pre>
[x,y] = mygrid(pi,2*pi);</code></pre>

View File

@ -28,14 +28,14 @@ print($array[0]); // Prints "first\n"
print($array[1]); // Prints "second\n"
print($array[2]); // Prints "third\n"
vector $roger = <<3.0, 7.7, 9.1>>;
vector $more = <<4.5, 6.789, 9.12356>>;
vector $roger = &lt;<3.0, 7.7, 9.1>>;
vector $more = &lt;<4.5, 6.789, 9.12356>>;
// Assign a vector to variable $test:
vector $test = <<3.0, 7.7, 9.1>>;
$test = <<$test.x, 5.5, $test.z>>
// $test is now <<3.0, 5.5, 9.1>>
vector $test = &lt;<3.0, 7.7, 9.1>>;
$test = &lt;&lt;$test.x, 5.5, $test.z>>
// $test is now &lt;<3.0, 5.5, 9.1>>
matrix $a3[3][4] = <<2.5, 4.5, 3.25, 8.05;
matrix $a3[3][4] = &lt;<2.5, 4.5, 3.25, 8.05;
1.12, 1.3, 9.5, 5.2;
7.23, 6.006, 2.34, 4.67>></code></pre>
@ -82,7 +82,7 @@ global proc float dynTimePlayback( float $frames )
// Check for negative $frames. This indicates
// $silent mode.
//
if ($frames < 0)
if ($frames &lt; 0)
{
$silent = 1;
$frames = -$frames;
@ -102,7 +102,7 @@ global proc float dynTimePlayback( float $frames )
$startTime = `timerX`;
// play -wait;
int $i;
for ($i = 1; $i < $frames; $i++ )
for ($i = 1; $i &lt; $frames; $i++ )
{
// Set time
//
@ -110,7 +110,7 @@ global proc float dynTimePlayback( float $frames )
int $obj;
// Request count for every particle object.
//
for ($obj = 0; $obj < $particleCount; $obj++)
for ($obj = 0; $obj &lt; $particleCount; $obj++)
{
string $cmd = "getAttr " + $particleObjects[$obj]+".count";
eval( $cmd );
@ -118,7 +118,7 @@ global proc float dynTimePlayback( float $frames )
// Request position for every transform
// (includes every rigid body).
//
for ($obj = 0; $obj < $trCount; $obj++)
for ($obj = 0; $obj &lt; $trCount; $obj++)
{
string $cmd = "getAttr " + $transforms[$obj]+".translate";
eval ($cmd);
@ -134,4 +134,4 @@ global proc float dynTimePlayback( float $frames )
print( "Playback $rate: " + $rate + " $frames/sec\n" );
}
return ( $rate );
} // timePlayback //</code></pre>
} // timePlayback //</code></pre>

View File

@ -11,14 +11,14 @@ schemes NAT_1;
begin
P: for k being Nat
st for n being Nat st n < k holds Fib (n+1) n
st for n being Nat st n &lt; k holds Fib (n+1) ≥ n
holds Fib (k+1) ≥ k
proof let k be Nat; assume
IH: for n being Nat st n < k holds Fib (n+1) n;
IH: for n being Nat st n &lt; k holds Fib (n+1) ≥ n;
per cases;
suppose k ≤ 1; then k = 0 or k = 0+1 by CQC_THE1:2;
hence Fib (k+1) ≥ k by PRE_FF:1;
suppose 1 < k; then
suppose 1 &lt; k; then
1+1 ≤ k by NAT_1:38; then
consider m being Nat such that
A: k = 1+1+m by NAT_1:28;
@ -33,8 +33,8 @@ IH: for n being Nat st n < k holds Fib (n+1) ≥ n;
m ≥ 1 by NAT_1:38; then
B: m+(m+1) ≥ m+1+1 by REAL_1:49;
C: k = m+1+1 by A, AXIOMS:13;
m < m+1 & m+1 < m+1+1 by REAL_1:69; then
m < k & m+1 < k by C, AXIOMS:22; then
m &lt; m+1 & m+1 &lt; m+1+1 by REAL_1:69; then
m &lt; k & m+1 &lt; k by C, AXIOMS:22; then
D: Fib (m+1) ≥ m & Fib (m+1+1) ≥ m+1 by IH;
Fib (m+1+1+1) = Fib (m+1) + Fib (m+1+1) by PRE_FF:1; then
Fib (m+1+1+1) ≥ m+(m+1) by D, REAL_1:55;
@ -42,4 +42,4 @@ IH: for n being Nat st n < k holds Fib (n+1) ≥ n;
end;
end;
for n being Nat holds Fib(n+1) ≥ n from Comp_Ind(P);</code></pre>
for n being Nat holds Fib(n+1) ≥ n from Comp_Ind(P);</code></pre>

View File

@ -57,18 +57,3 @@ dq 1.e-10 ; 0.000 000 000 1
dt 3.141592653589793238462 ; pi
do 1.e+4000 ; IEEE 754r quad precision
</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Numbers with underscores</h3>
<pre><code>mov ax,1100_1000b
mov ax,1100_1000y
mov ax,0b1100_1000
mov ax,0y1100_1000
dd 1.222_222_222</code></pre>

View File

@ -176,7 +176,7 @@ macro class*(head: expr, body: stmt): stmt {.immediate.} =
# Empty
# OfInherit
# Ident !"RootObj"
# Empty <= We want to replace this
# Empty &lt;= We want to replace this
# MethodDef
# ...
@ -219,4 +219,4 @@ animals.add(Cat(name: "Mitten", age: 10))
for a in animals:
echo a.vocalize()
echo a.age_human_yrs()</code></pre>
echo a.age_human_yrs()</code></pre>

View File

@ -44,16 +44,16 @@ comment *)</code></pre>
match t with
| Empty -> false
| Interval (l,h) ->
Endpoint.compare x l >= 0 && Endpoint.compare x h <= 0
Endpoint.compare x l >= 0 && Endpoint.compare x h &lt;= 0
(** [intersect t1 t2] returns the intersection of the two input
intervals *)
let intersect t1 t2 =
let min x y = if Endpoint.compare x y <= 0 then x else y in
let min x y = if Endpoint.compare x y &lt;= 0 then x else y in
let max x y = if Endpoint.compare x y >= 0 then x else y in
match t1,t2 with
| Empty, _ | _, Empty -> Empty
| Interval (l1,h1), Interval (l2,h2) ->
create (max l1 l2) (min h1 h2)
end ;;</code></pre>
end ;;</code></pre>

View File

@ -52,11 +52,11 @@ type_single filter_sum_single_3x3(read_only image2d_t imgIn,
// Image patch is row-wise accessed
// Filter kernel is centred in the middle
#pragma unroll
for (int y = -ROWS_HALF_3x3; y <= ROWS_HALF_3x3; ++y) // Start at the top left corner of the filter
for (int y = -ROWS_HALF_3x3; y &lt;= ROWS_HALF_3x3; ++y) // Start at the top left corner of the filter
{
coordCurrent.y = coordBase.y + y;
#pragma unroll
for (int x = -COLS_HALF_3x3; x <= COLS_HALF_3x3; ++x) // And end at the bottom right corner
for (int x = -COLS_HALF_3x3; x &lt;= COLS_HALF_3x3; ++x) // And end at the bottom right corner
{
coordCurrent.x = coordBase.x + x;
coordBorder = borderCoordinate(coordCurrent, rows, cols, border);

View File

@ -67,22 +67,4 @@ $result[$t.$sName]
# new functionality
@remove[iOffset;iLimit]
$iLimit(^iLimit.int(0))
$t[^t.select(^t.offset[]<$iOffset || ^t.offset[]>=$iOffset+$iLimit)]</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Code block starting with a comment</h3>
<pre><code># Doesn't work
# Does work</code></pre>
<pre><code> # Does work when prefixed with a space</code></pre>
<h3>Comments inside expressions break literals and operators</h3>
<pre><code>^if(
$age>=4 # not too young
&& $age<=80 # and not too old
)</code></pre>
$t[^t.select(^t.offset[]&lt;$iOffset || ^t.offset[]>=$iOffset+$iLimit)]</code></pre>

View File

@ -54,10 +54,10 @@ $1, $_, %!;</code></pre>
$conf{user} = delete $conf{username} unless $conf{user};
}
else { # Process .pause manually
open my $pauserc, '<', $filename
open my $pauserc, '&lt;', $filename
or die "can't open $filename for reading: $!";
while (<$pauserc>) {
while (&lt;$pauserc>) {
chomp;
next unless $_ and $_ !~ /^\s*#/;
@ -68,4 +68,4 @@ $1, $_, %!;</code></pre>
}
return \%conf;
}</code></pre>
}</code></pre>

View File

@ -41,7 +41,7 @@ trait ezcReflectionReturnInfo {
function getReturnDescription() { /*2*/ }
}
function gen_one_to_three() {
for ($i = 1; $i <= 3; $i++) {
for ($i = 1; $i &lt;= 3; $i++) {
// Note that $i is preserved between yields.
yield $i;
}
@ -64,4 +64,4 @@ $a = &lt;&lt;&lt;FOO
FOO;
$b = &lt;&lt;&lt;"FOOBAR"
Interpolation inside Heredoc strings {$obj->values[3]->name}
FOOBAR;</code></pre>
FOOBAR;</code></pre>

View File

@ -1,6 +1,6 @@
<h2>Comments</h2>
<pre><code># This is a comment
<# This is a
&lt;# This is a
multi-line comment #></code></pre>
<h2>Variable Interpolation</h2>
@ -16,4 +16,4 @@ $Names = @("Bob", "Alice")
$Names | ForEach {
SayHello $_
}
</code></pre>
</code></pre>

View File

@ -21,24 +21,3 @@ fibo(N, F) :-
N >= 2, N1 is N - 1, N2 is N - 2,
fibo(N1, F1), fibo(N2, F2), F is F1 + F2,
assert(fibo(N,F):-!). % assert as first clause</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Null-ary predicates are not highlighted</h3>
<pre><code>halt.
trace.
:- if(test1).
section_1.
:- elif(test2).
section_2.
:- elif(test3).
section_3.
:- else.
section_else.
:- endif.</code></pre>

View File

@ -52,7 +52,7 @@ script(type="text/javascript").
alert('foo');
alert('bar');
- var classes = ['foo', 'bar', 'baz']
- for (var x = 0; x < 3; x++)
- for (var x = 0; x &lt; 3; x++)
li item
</code></pre>

View File

@ -30,7 +30,7 @@ $foo::bar::baz</code></pre>
<h2>Functions</h2>
<pre><code>require apache
template('apache/vhost-default.conf.erb')
[1,20,3].filter |$value| { $value < 10 }</code></pre>
[1,20,3].filter |$value| { $value &lt; 10 }</code></pre>
<h2>All-in-one example</h2>
<pre><code>file {'ntp.conf':
@ -114,10 +114,10 @@ $rootgroup = $osfamily ? {
default => 'root',
}
User <| groups == 'admin' |>
Concat::Fragment <<| tag == "bacula-storage-dir-${bacula_director}" |>>
User &lt;| groups == 'admin' |>
Concat::Fragment &lt;&lt;| tag == "bacula-storage-dir-${bacula_director}" |>>
Exec <| title == 'update_migrations' |> {
Exec &lt;| title == 'update_migrations' |> {
environment => 'RUBYLIB=/usr/lib/ruby/site_ruby/1.8/',
}
@ -137,16 +137,3 @@ Exec <| title == 'update_migrations' |> {
target => '/etc/nagios3/conf.d/nagios_service.cfg',
notify => Service[$nagios::params::nagios_service],
}</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>More than one level of nested braces inside interpolation</h3>
<pre><code>"Foobar ${foo({
bar => {baz => 42}
baz => 42
})} <- broken"</code></pre>

View File

@ -24,7 +24,7 @@ nan</code></pre>
<p>Inline code requires the desired language to be loaded.
On this page, check C, C++ and Fortran <strong>before</strong> checking Pure should make
the examples below work properly.</p>
<pre><code>%<
<pre><code>%&lt;
int mygcd(int x, int y)
{
if (y == 0)
@ -34,7 +34,7 @@ int mygcd(int x, int y)
}
%>
%< -*- Fortran90 -*-
%&lt; -*- Fortran90 -*-
function fact(n) result(p)
integer n, p
p = 1
@ -44,7 +44,7 @@ function fact(n) result(p)
end function fact
%>
%< -*- C++ -*-
%&lt; -*- C++ -*-
#include &lt;pure/runtime.h>
#include &lt;string>
@ -112,4 +112,4 @@ extern "C" void map_destroy(exprmap *m)
safe (i,j) p = ~any (check (i,j)) p;
check (i1,j1) (i2,j2)
= i1==i2 || j1==j2 || i1+j1==i2+j2 || i1-j1==i2-j2;
end;</code></pre>
end;</code></pre>

View File

@ -49,13 +49,3 @@ are supported.'''</code></pre>
if __name__ == '__main__':
import doctest
doctest.testmod()</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Interpolation expressions containing strings with <code>{</code> or <code>}</code></h3>
<pre><code>f"{'}'}"</code></pre>

View File

@ -100,13 +100,3 @@ adjust:{[t;caTypes]
getCAs exec distinct caType from ca
adjust[t;`dividend] / adjust trades for dividends only</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>The global context is highlighted as a verb</h3>
<pre><code>\d .</code></pre>

View File

@ -308,22 +308,3 @@ floating-point numbers (without exponents).
See the `Python home page &lt;http://www.python.org>`_ for info.
Oh yes, the _`Norwegian Blue`. What's, um, what's wrong with it?</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Nothing is highlighted inside table cells</h3>
<pre><code>+---------------+----------+
| column 1 | column 2 |
+--------------+-----------+
| **bold**? | *italic*? |
+--------------+-----------+</code></pre>
<h3>The inline markup recognition rules are not as strict as they are in the spec</h3>
<p>No inline markup should be highlighted in the following code.</p>
<pre><code>2 * x a ** b (* BOM32_* ` `` _ __ |
"*" '|' (*) [*] {*} <*> * * * * * “*” „*“ “*„ ”*” „*” »*« * «*» »*» *</code></pre>

View File

@ -50,19 +50,3 @@ let y = c || d;
let add_one = |x: int| -> int { 1i + x };
let printer = || { println!("x is: {}", x); };
</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Nested block comments</h3>
<pre><code>/* Nested block
/* comments
are */
not supported */</code></pre>
<h3>Delimiters of parameters for closures that don't use braces</h3>
<pre><code>|x| x + 1i;</code></pre>

View File

@ -23,7 +23,7 @@ multi-line comment */
<pre><code>A**B;
'foo'||'bar'!!'baz'¦¦'test';
A&lt;>B>&lt;C;
A~=B¬=C^=D>=E<=F;
A~=B¬=C^=D>=E&lt;=F;
a*b/c+d-e&lt;f>g&amp;h|i!j¦k;
~a;¬b;^c;
(a eq b) ne (c gt d) lt e ge f le h;
@ -155,4 +155,4 @@ UYN7 rod 211 09sep2010 11.55
JD03 switch 383 09jan2013 13.99
BV1E timer 26 03aug2013 34.50
;
run;</code></pre>
run;</code></pre>

View File

@ -26,22 +26,3 @@ h1
#main
width: $width
</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Deprecated Sass syntax is not supported</h3>
<pre><code>.page
color = 5px + 9px
!width = 13px
.icon
width = !width</code></pre>
<h3>Selectors with pseudo classes are highlighted as property/value pairs</h3>
<pre><code>a:hover
text-decoration: underline</code></pre>

View File

@ -85,16 +85,3 @@ object lazyEvaluation {
println("sl2 = " + sl2)
}
}</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Nested block comments</h3>
<pre><code>/* Nested block
/* comments
are */
not supported */</code></pre>

View File

@ -69,13 +69,3 @@ comment *}</code></pre>
}
{/literal}
&lt;/style></code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Smarty tag in the middle of an HTML tag</h3>
<pre><code>&lt;div{if $test} class="test"{/if}>&lt;/div></code></pre>

View File

@ -29,12 +29,12 @@ let multiplier = 3
for _ in 1...power {
answer *= base
}
while square < finalSquare {
while square &lt; finalSquare {
// roll the dice
if ++diceRoll == 7 { diceRoll = 1 }
// move by the rolled amount
square += diceRoll
if square < board.count {
if square &lt; board.count {
// if we're still on the board, move up or down for a snake or a ladder
square += board[square]
}
@ -52,29 +52,16 @@ switch someCharacter {
<h2>Classes and attributes</h2>
<pre><code>class MyViewController: UIViewController {
@IBOutlet weak var button: UIButton!
@IBOutlet var textFields: [UITextField]!
@IBAction func buttonTapped(AnyObject) {
println("button tapped!")
@IBOutlet weak var button: UIButton!
@IBOutlet var textFields: [UITextField]!
@IBAction func buttonTapped(AnyObject) {
println("button tapped!")
}
}
@IBDesignable
class MyCustomView: UIView {
@IBInspectable var textColor: UIColor
@IBInspectable var iconHeight: CGFloat
/* ... */
@IBInspectable var textColor: UIColor
@IBInspectable var iconHeight: CGFloat
/* ... */
}</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Nested block comments</h3>
<pre><code>/* Nested block
/* comments
are */
not supported */</code></pre>

View File

@ -156,23 +156,3 @@ table{border:1px solid black}.
|This|is|a|row|
{background:#ddd}. |This|is|grey|row|</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Nested styles are only partially supported</h3>
<p>Only one level of nesting is supported.</p>
<pre><code>*A bold paragraph %containing a span with broken _italic_ inside%!*</code></pre>
<h3>HTML inside Textile is not supported</h3>
<p>But Textile inside HTML should be just fine.</p>
<pre><code>&lt;strong>This _should_ work properly.&lt;/strong>
*But this is &lt;em>definitely&lt;/em> broken.*</code></pre>

View File

@ -23,13 +23,3 @@ inside #}</code></pre>
{% else %}
&lt;p>Not foo...&lt;/p>
{% endif %}</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Tag containing Twig is not highlighted</h3>
<pre><code>&lt;div{% if foo %} class="bar"{% endif %}>&lt;/div></code></pre>

View File

@ -7,10 +7,10 @@ REM foobar
<pre><code>Public Function findValue(ByVal arr() As Double,
ByVal searchValue As Double) As Double
Dim i As Integer = 0
While i <= UBound(arr) AndAlso arr(i) <> searchValue
While i &lt;= UBound(arr) AndAlso arr(i) &lt;> searchValue
' If i is greater than UBound(arr), searchValue is not checked.
i += 1
End While
If i > UBound(arr) Then i = -1
Return i
End Function</code></pre>
End Function</code></pre>

View File

@ -5,8 +5,8 @@ I am not</code></pre>
<h2>Literals</h2>
<pre><code>constant FREEZE : integer := 32;
constant TEMP : real := 32.0;
A_INT <= 16#FF#;
B_INT <= 2#1010_1010#;
A_INT &lt;= 16#FF#;
B_INT &lt;= 2#1010_1010#;
MONEY := 1_000_000.0;
FACTOR := 2.2E-6;
constant DEL1 :time := 10 ns;
@ -17,9 +17,9 @@ signal CLK : MY_LOGIC := '0';
signal STATE : T_STATE := IDLE;
constant FLAG :bit_vector(0 to 7) := "11111111";
constant MSG : string := "Hello";
BIT_8_BUS <= B"1111_1111";
BIT_9_BUS <= O"353";
BIT_16_BUS <= X"AA55";
BIT_8_BUS &lt;= B"1111_1111";
BIT_9_BUS &lt;= O"353";
BIT_16_BUS &lt;= X"AA55";
constant TWO_LINE_MSG : string := "Hello" & CR & "World";</code></pre>
<h2>Full example</h2>
@ -37,8 +37,8 @@ end entity fadd;
architecture circuits of fadd is -- full adder stage, body
begin -- circuits of fadd
s <= a xor b xor cin after 1 ns;
cout <= (a and b) or (a and cin) or (b and cin) after 1 ns;
s &lt;= a xor b xor cin after 1 ns;
cout &lt;= (a and b) or (a and cin) or (b and cin) after 1 ns;
end architecture circuits; -- of fadd
library IEEE;

View File

@ -143,23 +143,3 @@ dolor sit amet.
|
|15.00
|}</code></pre>
<h2>Known failures</h2>
<p>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 doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Nested magic words are not supported</h3>
<pre><code>{{#switch:{{PAGENAME}}
| L'Aquila = No translation
| L = Not OK
| L&apos;Aquila = Entity escaping
| L&#39;Aquila = Numeric char encoding
}}</code></pre>
<h3>Nesting of bold and italic is not supported</h3>
<pre><code>''Italic with '''bold''' inside''</code></pre>

View File

@ -21,8 +21,8 @@ Rem This is a remark</code></pre>
<pre><code>Dim g As Graphics
Dim yOffSet As Integer
g = OpenPrinterDialog()
If g <> Nil Then
If MainDishMenu.ListIndex <> -1 Then
If g &lt;> Nil Then
If MainDishMenu.ListIndex &lt;> -1 Then
g.Bold = True
g.DrawString("Main Dish:",20,20)
g.Bold = False

View File

@ -89,7 +89,7 @@ bill-to: &id001
state : MI
postal : 48046
ship-to:
<<: *id001
&lt;&lt;: *id001
product:
- sku : BL394D
quantity : 4

View File

@ -115,7 +115,7 @@
<h1>Limitations</h1>
<ul>
<li>Any pre-existing HTML in the code will be stripped off. <a href="faq.html#if-pre-existing-html-is-stripped-off-how-can-i-highlight">There are ways around it though</a>.</li>
<li>Regex-based so it *will* fail on certain edge cases, which are documented in the <a href="examples.html">Examples section</a>.</li>
<li>Regex-based so it *will* fail on certain edge cases, which are documented in the <a href="known-failures.html">known failues page</a>.</li>
<li>No IE 6-8 support. If someone can read code, they are probably in the 85% of the population with a modern browser.</li>
</ul>
</section>

384
known-failures.html Normal file
View File

@ -0,0 +1,384 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="favicon.png" />
<title>Known failures ▲ Prism</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="themes/prism.css" data-noprefix />
<style>
#toc {
display: block;
position: static;
max-width: 900px;
font-size: 100%;
color: black;
}
#toc > ol {
columns: 4;
}
</style>
<script src="scripts/prefixfree.min.js"></script>
<script>var _gaq = [['_setAccount', 'UA-33746269-1'], ['_trackPageview']];</script>
<script src="https://www.google-analytics.com/ga.js" async></script>
</head>
<body>
<header>
<div class="intro" data-src="templates/header-main.html" data-type="text/html"></div>
<h2>Known failures</h2>
<p>A list of rare edge cases where Prism highlights code incorrectly.</p>
</header>
<section>
<p>There are certain edge cases where Prism will fail. There are always such cases in every regex-based syntax highlighter. <br>
However, Prism dares to be open and honest about them. If a failure is listed here, it doesnt mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.</p>
</section>
<section class="language-applescript">
<h3>Comments only support one level of nesting</h3>
<pre><code>(* Nested block
(* comments
(* on more than
2 levels *)
are *)
not supported *)</code></pre>
</section>
<section class="language-autoit">
<h3>Nested block comments</h3>
<pre><code>#cs
#cs
foo()
#ce
#ce</code></pre>
</section>
<section class="language-bison">
<h3>Two levels of nesting inside C section</h3>
<pre><code>{
if($1) {
if($2) {
}
}
} // &lt;- Broken
%%
%%</code></pre>
</section>
<section class="language-d">
<h3>Comments only support one level of nesting</h3>
<pre><code>/+ /+ /+ this does not work +/ +/ +/</code></pre>
<h3>Token strings only support one level of nesting</h3>
<pre><code>q{ q{ q{ this does not work } } }</code></pre>
</section>
<section class="language-elixir">
<h3>String interpolation in single-quoted strings</h3>
<pre><code>'#{:atom} &lt;- this should not be highligted'</code></pre>
</section>
<section class="language-groovy">
<h3>Two divisions on the same line</h3>
<pre><code>2 / 3 / 4</code></pre>
</section>
<section class="language-inform7">
<h3>Names starting with a number</h3>
<pre><code>The box 1A is a container</code></pre>
</section>
<section class="language-javascript">
<h3>String interpolation containing a closing brace</h3>
<pre><code>`${ /* } */ a + b }`
`${ '}' }`</code></pre>
<h3>String interpolation with deeply nested braces</h3>
<pre><code>`${foo({ a: { b: { c: true } } })}`</code></pre>
</section>
<section class="language-less">
<h3>At-rules looking like variables</h3>
<pre><code>@import "some file.less";</code></pre>
<h3>At-rules containing interpolation</h3>
<pre><code>@import "@{themes}/tidal-wave.less";</code></pre>
<h3>extend is not highlighted consistently</h3>
<pre><code>nav ul {
&:extend(.inline);
background: blue;
}
.a:extend(.b) {}</code></pre>
</section>
<section class="language-lua">
<h3>Functions with a single string parameter not using parentheses are not highlighted</h3>
<pre><code>foobar"param";</code></pre>
</section>
<section class="language-markdown">
<h3>Nesting of elements is not fully supported</h3>
<pre><code>[Link partially *italic* DOESN'T work](http://example.com)
_ [But link inside italic DOES work](http://example.com) _
[Link partially **bold** DOESN'T work](http://example.com)
__ [But link inside bold DOES work](http://example.com) __</code></pre>
</section>
<section class="language-nasm">
<h3>Numbers with underscores</h3>
<pre><code>mov ax,1100_1000b
mov ax,1100_1000y
mov ax,0b1100_1000
mov ax,0y1100_1000
dd 1.222_222_222</code></pre>
</section>
<section class="language-parser">
<h3>Code block starting with a comment</h3>
<pre><code># Doesn't work
# Does work</code></pre>
<pre><code> # Does work when prefixed with a space</code></pre>
<h3>Comments inside expressions break literals and operators</h3>
<pre><code>^if(
$age>=4 # not too young
&& $age&lt;=80 # and not too old
)</code></pre>
</section>
<section class="language-prolog">
<h3>Null-ary predicates are not highlighted</h3>
<pre><code>halt.
trace.
:- if(test1).
section_1.
:- elif(test2).
section_2.
:- elif(test3).
section_3.
:- else.
section_else.
:- endif.</code></pre>
</section>
<section class="language-puppet">
<h3>More than one level of nested braces inside interpolation</h3>
<pre><code>"Foobar ${foo({
bar => {baz => 42}
baz => 42
})} &lt;- broken"</code></pre>
</section>
<section class="language-python">
<h3>Interpolation expressions containing strings with <code>{</code> or <code>}</code></h3>
<pre><code>f"{'}'}"</code></pre>
</section>
<section class="language-q">
<h3>The global context is highlighted as a verb</h3>
<pre><code>\d .</code></pre>
</section>
<section class="language-rest">
<h3>Nothing is highlighted inside table cells</h3>
<pre><code>+---------------+----------+
| column 1 | column 2 |
+--------------+-----------+
| **bold**? | *italic*? |
+--------------+-----------+</code></pre>
<h3>The inline markup recognition rules are not as strict as they are in the spec</h3>
<p>No inline markup should be highlighted in the following code.</p>
<pre><code>2 * x a ** b (* BOM32_* ` `` _ __ |
"*" '|' (*) [*] {*} &lt;*> * * * * * “*” „*“ “*„ ”*” „*” »*« * «*» »*» *</code></pre>
</section>
<section class="language-rust">
<h3>Nested block comments</h3>
<pre><code>/* Nested block
/* comments
are */
not supported */</code></pre>
<h3>Delimiters of parameters for closures that don't use braces</h3>
<pre><code>|x| x + 1i;</code></pre>
</section>
<section class="language-sass">
<h3>Deprecated Sass syntax is not supported</h3>
<pre><code>.page
color = 5px + 9px
!width = 13px
.icon
width = !width</code></pre>
<h3>Selectors with pseudo classes are highlighted as property/value pairs</h3>
<pre><code>a:hover
text-decoration: underline</code></pre>
</section>
<section class="language-scala">
<h3>Nested block comments</h3>
<pre><code>/* Nested block
/* comments
are */
not supported */</code></pre>
</section>
<section class="language-swift">
<h3>Nested block comments</h3>
<pre><code>/* Nested block
/* comments
are */
not supported */</code></pre>
</section>
<section class="language-textile">
<h3>HTML inside Textile is not supported</h3>
<p>But Textile inside HTML should be just fine.</p>
<pre><code>&lt;strong>This _should_ work properly.&lt;/strong>
*But this is &lt;em>definitely&lt;/em> broken.*</code></pre>
</section>
<section class="language-twig">
<h3>Tag containing Twig is not highlighted</h3>
<pre><code>&lt;div{% if foo %} class="bar"{% endif %}>&lt;/div></code></pre>
</section>
<section class="language-wiki">
<h3>Nested magic words are not supported</h3>
<pre><code>{{#switch:{{PAGENAME}}
| L'Aquila = No translation
| L = Not OK
| L&apos;Aquila = Entity escaping
| L&#39;Aquila = Numeric char encoding
}}</code></pre>
<h3>Nesting of bold and italic is not supported</h3>
<pre><code>''Italic with '''bold''' inside''</code></pre>
</section>
<footer data-src="templates/footer.html" data-type="text/html"></footer>
<script src="scripts/utopia.js"></script>
<script src="prism.js"></script>
<script src="plugins/autoloader/prism-autoloader.js" data-autoloader-path="components"></script>
<script src="components.js"></script>
<script>
$$('section[class*=language-]').forEach(function (section) {
var lang = /(?:^|\s)language-([\w-]+)(?:$|\s)/.exec(section.className)[1];
var title = components.languages[lang].title;
$u.element.create('h1', {
contents: title,
id: lang,
before: section.firstChild
});
});
$$('section > h1').forEach(function (h1) {
$u.element.create('p', {
contents: {
tag: 'a',
properties: {
href: '#toc'
},
contents: '↑ Back to top'
},
inside: h1.parentNode
});
});
</script>
<script src="scripts/code.js"></script>
</body>
</html>