1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
<h1>Textile</h1>
<p>To use this language, use the class "language-textile".</p>
<h2>HTML</h2>
<pre><code>I am <b>very</b> serious.
<div style="background:#fff">Foo bar</div></code></pre>
<h2>Blocks</h2>
<pre><code>h1. Header 1
h2. Header 2
h3. Header 3 written on
multiple lines
bq. A block quotation
on multiple lines.</code></pre>
<h2>Footnotes</h2>
<pre><code>This is covered elsewhere[1].
fn1. Down here, in fact.</code></pre>
<h2>Structural emphasis</h2>
<pre><code>I _believe_ every word.
And then? She *fell*!
I __know__.
I **really** __know__.
??Cat's Cradle?? by Vonnegut
Convert with @r.to_html@
I'm -sure- not sure.
You are a +pleasant+ child.
a ^2^ + b ^2^ = c ^2^
log ~2~ x</code></pre>
<h2>Block attributes</h2>
<pre><code>p(example1). An example
p(#big-red). Red here
p(example1#big-red2). Red here
p{color:blue;margin:30px}. Spacey blue
p[fr]. rouge</code></pre>
<h2>Phrase attributes</h2>
<pre><code>I seriously *{color:red}blushed*
when I _(big)sprouted_ that
corn stalk from my
%[es]cabeza%.</code></pre>
<h2>Phrase alignments and indentation</h2>
<pre><code>p<. align left
p>. align right
p=. centered
p<>. justified
p(. left ident 1em
p((. left ident 2em
p))). right ident 3em</code></pre>
<h2>Attributes and alignments combined</h2>
<pre><code>h2()>. Bingo.
h3()>[no]{color:red}. Bingo</code></pre>
<h2>Lists</h2>
<pre><code># First item
# Second item
# Third
# Fuel could be:
## Coal
## Gasoline
## Electricity
# Humans need only:
## Water
## Protein
* First item
* Second item
* Third
* Fuel could be:
** Coal
** Gasoline
** Electricity
* Humans need only:
** Water
** Protein
#(foo) List can have attributes too
#{background: red} Red item</code></pre>
<h2>Links and images</h2>
<pre><code>I searched "Google":http://google.com.
I am crazy about "Hobix":hobix
and "it's":hobix "all":hobix I ever
"link to":hobix!
[hobix]http://hobix.com
And "(some-link)[en]links":# can have attributes too!
!http://redcloth.org/hobix.com/textile/sample.jpg!
!openwindow1.gif(Bunny.)!
!openwindow1.gif!:http://hobix.com/
!>obake.gif!
And others sat all round the small
machine and paid it to sing to them.</code></pre>
<h2>Tables</h2>
<pre><code>| name | age | sex |
| joan | 24 | f |
| archie | 29 | m |
| bella | 45 | f |
|_. name |_. age |_. sex |
| joan | 24 | f |
| archie | 29 | m |
| bella | 45 | f |
|_. attribute list |
|<. align left |
|>. align right|
|=. center |
|<>. justify |
|^. valign top |
|~. bottom |
|\2. spans two cols |
| col 1 | col 2 |
|/3. spans 3 rows | a |
| b |
| c |
|{background:#ddd}. Grey cell|
table{border:1px solid black}.
|This|is|a|row|
|This|is|a|row|
|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 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 styles are only partially supported</h3>
<p>Two levels of nesting should work. Above, it depends on the order of the tokens in the grammar.</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><strong>This _should_ work properly.</strong>
*But this is <em>definitely</em> broken.*</code></pre>