Skip to content

Commit

Permalink
Known failure page (#1876)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
RunDevelopment authored and mAAdhaTTah committed Jun 30, 2019
1 parent a16d4a2 commit 36a5fa0
Show file tree
Hide file tree
Showing 65 changed files with 539 additions and 543 deletions.
4 changes: 2 additions & 2 deletions examples/prism-actionscript.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h2>Full example</h2>
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;
Expand Down Expand Up @@ -130,4 +130,4 @@ <h2>Full example</h2>
colorBmp.paletteMap(sourceBmp, sourceBmp.rect, O, RLUT, GLUT, BLUT, null);
}
}
}</code></pre>
}</code></pre>
15 changes: 0 additions & 15 deletions examples/prism-applescript.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,3 @@ <h2>Classes and units</h2>
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 doesn’t 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>
4 changes: 2 additions & 2 deletions examples/prism-arduino.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h2>Booleans</h2>
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>
Expand All @@ -28,7 +28,7 @@ <h2>Full example</h2>
* runs once before everyhing else
*/
void setup() {
pinMode(piezo, OUTPUT);
pinMode(piezo, OUTPUT);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions examples/prism-asciidoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ <h2>Tables</h2>
<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>
Expand All @@ -101,4 +101,4 @@ <h2>Inline styles</h2>
<h2>Attribute entries</h2>
<pre><code>:Author Initials: JB
{authorinitials}
:Author Initials!:</code></pre>
:Author Initials!:</code></pre>
38 changes: 19 additions & 19 deletions examples/prism-aspnet.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<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>
<p>This requires the C# component to be loaded.
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>
6 changes: 3 additions & 3 deletions examples/prism-autohotkey.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2>Full example</h2>
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:
Expand All @@ -37,7 +37,7 @@ <h2>Full example</h2>
}
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
Expand Down Expand Up @@ -65,4 +65,4 @@ <h2>Full example</h2>
; 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>
14 changes: 0 additions & 14 deletions examples/prism-autoit.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,3 @@ <h2>Keywords and variables</h2>
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 doesn’t 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>
4 changes: 2 additions & 2 deletions examples/prism-bash.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>Variables</h2>
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
Expand All @@ -46,4 +46,4 @@ <h2>Some well-known commands</h2>

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>
4 changes: 2 additions & 2 deletions examples/prism-basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h2>QuickBASIC example</h2>
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$
Expand All @@ -66,4 +66,4 @@ <h2>QuickBASIC example</h2>
REM This procedure uses a local variable called Stars$
Stars$ = STRING$(StarCount, "*")
PRINT Stars$
END SUB</code></pre>
END SUB</code></pre>
22 changes: 2 additions & 20 deletions examples/prism-bison.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h2>Full example</h2>
string* op_val;
}

%start input
%start input

%token &lt;int_val> INTEGER_LITERAL
%type &lt;int_val> exp
Expand All @@ -74,7 +74,7 @@ <h2>Full example</h2>
{
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);
Expand All @@ -84,21 +84,3 @@ <h2>Full example</h2>
{
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 doesn’t 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>
12 changes: 6 additions & 6 deletions examples/prism-brainfuck.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ <h2>Full example</h2>
>+++ 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:
Expand All @@ -27,11 +27,11 @@ <h2>Full example</h2>
>---. 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>
16 changes: 8 additions & 8 deletions examples/prism-bro.html
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ <h2>Full example</h2>
# 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 )
Expand Down Expand Up @@ -343,8 +343,8 @@ <h2>Full example</h2>
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.

Expand Down Expand Up @@ -380,7 +380,7 @@ <h2>Full example</h2>
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;
}

Expand Down Expand Up @@ -462,7 +462,7 @@ <h2>Full example</h2>
}

# 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 ||
Expand Down Expand Up @@ -559,7 +559,7 @@ <h2>Full example</h2>
return F;
}

if ( idx[orig] <= |v| && n >= v[idx[orig]] )
if ( idx[orig] &lt;= |v| && n >= v[idx[orig]] )
{
++idx[orig];
return T;
Expand All @@ -578,7 +578,7 @@ <h2>Full example</h2>
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;
Expand Down Expand Up @@ -642,4 +642,4 @@ <h2>Full example</h2>
for ( orig in distinct_low_ports )
lowport_summary(distinct_low_ports, orig);
}
</code></pre>
</code></pre>
4 changes: 2 additions & 2 deletions examples/prism-c.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2>Full example</h2>
{
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>
10 changes: 5 additions & 5 deletions examples/prism-clojure.html
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ <h2>Full example</h2>

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

Expand All @@ -275,7 +275,7 @@ <h2>Full example</h2>
; 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:
Expand Down Expand Up @@ -365,7 +365,7 @@ <h2>Full example</h2>
(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
Expand All @@ -383,4 +383,4 @@ <h2>Full example</h2>

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

0 comments on commit 36a5fa0

Please sign in to comment.