hasRawText() tag case insensitivity & closure:
note: Although xhtml calls for lower-case tag names with all tags closed (even on void elements), Textile doesn't care if xhtml in its input is well formed, it just has to output it verbatim. Therefore we use the more relaxed HTML5 rules (allowing for mixed case element names) for detecting 'raw' input text. In addition, xhtml allows void tags to be closed like normal tags (so <hr></hr> is valid in xhtml) and Textile should let these through untouched too.
input: |
<hr>
<hr/>
<hr >
<hr />
<hr >
<hr />
<hr></hr>
<hr class="whatnot"></hr >
<hr ></hr >
<HR>
<HR/>
<HR >
<HR />
<HR >
<HR />
<img src="blahblah.jpg" />
<p>Hello World!</p>
<P>Hello World!</P>
<P>Hello World!</p>
<p>Hello World!</P>
expect: |
<hr>
<hr/>
<hr >
<hr />
<hr >
<hr />
<hr></hr>
<hr class="whatnot"></hr >
<hr ></hr >
<HR>
<HR/>
<HR >
<HR />
<HR >
<HR />
<img src="blahblah.jpg" />
<p>Hello World!</p>
<P>Hello World!</P>
<P>Hello World!</p>
<p>Hello World!</P>
Case insensitive p breaks:
setup:
setHtmlType: xhtml
input : |
I spoke.
And none replied.
I spoke.<br>
And none replied.
I spoke.<br/>
And none replied.
I spoke.<br />
And none replied.
I spoke.<BR>
And none replied.
I spoke.<BR/>
And none replied.
I spoke.<BR />
And none replied.
expect: |
<p>I spoke.<br />
And none replied.</p>
<p>I spoke.<br />
And none replied.</p>
<p>I spoke.<br />
And none replied.</p>
<p>I spoke.<br />
And none replied.</p>
<p>I spoke.<br />
And none replied.</p>
<p>I spoke.<br />
And none replied.</p>
<p>I spoke.<br />
And none replied.</p>
Mixed HTML & Textile:
input : |
<p>*foo*</p>
<p>*foo*[^2^]</p>
expect: |
<p><strong>foo</strong></p>
<p><strong>foo</strong><sup>2</sup></p>
Styled numbers:
input : |
_(class1 class2#id1)1_ *[en]2* **(#id)3** ??4?? __5__ %6% +7+ -(foobarbaz#boom bang)8- ~9~ ^10^
1[^st^], 2[^nd^], 3[^rd^]
expect: |
<p><em class="class1 class2" id="id1">1</em> <strong lang="en">2</strong> <b id="id">3</b> <cite>4</cite> <i>5</i> <span>6</span> <ins>7</ins> <del class="foobarbaz">8</del> <sub>9</sub> <sup>10</sup></p>
<p>1<sup>st</sup>, 2<sup>nd</sup>, 3<sup>rd</sup></p>
Percentages...:
input : |
0 %1% _2_ 45% 6.7% %89.0
expect: |
<p>0 <span>1</span> <em>2</em> 45% 6.7% %89.0</p>
Some redding:
input: |
h2{color:red}. Some redding
expect: |
<h2 style="color:red;">Some redding</h2>
Basic glyphs:
input : |
"Textile(c)" is a registered(r) 'trademark' of Textpattern(tm) -- or TXP(That's textpattern!) -- at least it was - back in '88 when 2x4 was (+/-)5(o)C ... QED!
p{font-size: 200%;}. 2(1/4) 3(1/2) 4(3/4)
"." ".." "..." '.' '..' '...' Allow quoted periods.
expect : |
<p>“Textile©” is a registered® ‘trademark’ of Textpattern™ — or <abbr title="That’s textpattern!"><span class="caps">TXP</span></abbr> — at least it was – back in ’88 when 2×4 was ±5°C … <span class="caps">QED</span>!</p>
<p style="font-size: 200%;">2¼ 3½ 4¾</p>
<p>“.” “..” “…” ‘.’ ‘..’ ‘…’ Allow quoted periods.</p>
Classes and IDs:
input : |
p(c). Valid class
p(#id). Valid ID
p(c#id). Valid class and ID
p(c9). Valid class
p(c4.2). Valid class
p(c1 c.2 c-3). Valid class
expect : |
<p class="c">Valid class</p>
<p id="id">Valid ID</p>
<p class="c" id="id">Valid class and ID</p>
<p class="c9">Valid class</p>
<p class="c4.2">Valid class</p>
<p class="c1 c.2 c-3">Valid class</p>
Dimensions :
input: |
[1/2] x [1/4] and (1/2)" x [1/4]" and (1/2)' x (1/4)'
(2 x 10) X (3 / 4) x (200 + 64)
1 x 1 = 1
1 x1 = 1
1x 1 = 1
1x1 = 1
1 X 1 = 1
1 X1 = 1
1X 1 = 1
1X1 = 1
What is 1 x 1?
What is 1x1?
What is 1 X 1?
What is 1X1?
1 x 2 x 3 = 6
1x2x3=6
1x2 x 1x3 = 6
2' x 2' = 4 sqft.
2'x 2' = 4 sqft.
2' x2' = 4 sqft.
2'x2' = 4 sqft.
2' X 2' = 4 sqft.
2'X 2' = 4 sqft.
2' X2' = 4 sqft.
2'X2' = 4 sqft.
2" x 2" = 4 sqin.
2"x 2" = 4 sqin.
2" x2" = 4 sqin.
2"x2" = 4 sqin.
2" X 2" = 4 sqin.
2"X 2" = 4 sqin.
2" X2" = 4 sqin.
2"X2" = 4in[^2^].
What is 1.2 x 3.5?
What is .2 x .5?
What is 1.2x3.5?
What is .2x.5?
What is 1.2' x3.5'?
What is .2"x .5"?
1 x $10.00 x -£ 1.23 x ¥20,000 x -¤120.00 x ฿1,000,000 x -€110,00
expect: |
<p>½ × ¼ and ½” × ¼” and ½’ × ¼’</p>
<p>(2 × 10) × (3 / 4) × (200 + 64)</p>
<p>1 × 1 = 1</p>
<p>1 ×1 = 1</p>
<p>1× 1 = 1</p>
<p>1×1 = 1</p>
<p>1 × 1 = 1</p>
<p>1 ×1 = 1</p>
<p>1× 1 = 1</p>
<p>1×1 = 1</p>
<p>What is 1 × 1?</p>
<p>What is 1×1?</p>
<p>What is 1 × 1?</p>
<p>What is 1×1?</p>
<p>1 × 2 × 3 = 6</p>
<p>1×2×3=6</p>
<p>1×2 × 1×3 = 6</p>
<p>2’ × 2’ = 4 sqft.</p>
<p>2’× 2’ = 4 sqft.</p>
<p>2’ ×2’ = 4 sqft.</p>
<p>2’×2’ = 4 sqft.</p>
<p>2’ × 2’ = 4 sqft.</p>
<p>2’× 2’ = 4 sqft.</p>
<p>2’ ×2’ = 4 sqft.</p>
<p>2’×2’ = 4 sqft.</p>
<p>2” × 2” = 4 sqin.</p>
<p>2”× 2” = 4 sqin.</p>
<p>2” ×2” = 4 sqin.</p>
<p>2”×2” = 4 sqin.</p>
<p>2” × 2” = 4 sqin.</p>
<p>2”× 2” = 4 sqin.</p>
<p>2” ×2” = 4 sqin.</p>
<p>2”×2” = 4in<sup>2</sup>.</p>
<p>What is 1.2 × 3.5?</p>
<p>What is .2 × .5?</p>
<p>What is 1.2×3.5?</p>
<p>What is .2×.5?</p>
<p>What is 1.2’ ×3.5’?</p>
<p>What is .2”× .5”?</p>
<p>1 × $10.00 × -£ 1.23 × ¥20,000 × -¤120.00 × ฿1,000,000 × -€110,00</p>
Ruud's Improvements... :
input: |
??*text*??
_person_'s
*person*'s
"text":http://url/"
"text":http://url...
*CAPS "text":http://url*
"_text_"
*- text -*
<text *text*
expect: |
<p><cite><strong>text</strong></cite></p>
<p><em>person</em>’s</p>
<p><strong>person</strong>’s</p>
<p><a href="http://url/">text</a>”</p>
<p><a href="http://url/">text</a>…</p>
<p><strong><span class="caps">CAPS</span> <a href="http://url/">text</a></strong></p>
<p>“<em>text</em>”</p>
<p><strong>– text –</strong></p>
<p><text <strong>text</strong></p>
Other Ruud stuff :
input : |
*
**
* item1
expect : |
<p>*</p>
<p>**</p>
<ul>
<li>item1</li>
</ul>
Punctuation:
input : |
Greengrocers' apostrophe's.
'"I swear it was in '62, captain," replied I.'
Dad said; "Mum said: 'It's a beautiful day viz-a-viz a picnic, isn't it?' -- _I think_."
"'I swear it's true, captain,' replied I, 'Here's your list: 2 apples, a banana & a papaya.'"
in '88. blah. In the '90s blah. He's in his '90s' now.
Happened in '89.
in '89
in '89\x20
Happened in '89. it did.
File '1.png'. '1.' '1' '10m' '1.txt'
NATO(North Atlantic Treaty Organisation)'s pretty big.
ABC()'s poor knees.
ABC('s poor knees.
ABC)'s poor knees.
Here is a %(example)'spanned'% word.
The NHS(National Health Service)' charter states...
expect : |
<p>Greengrocers’ apostrophe’s.</p>
<p>‘“I swear it was in ’62, captain,” replied I.’</p>
<p>Dad said; “Mum said: ‘It’s a beautiful day viz-a-viz a picnic, isn’t it?’ — <em>I think</em>.”</p>
<p>“‘I swear it’s true, captain,’ replied I, ‘Here’s your list: 2 apples, a banana & a papaya.’”</p>
<p>in ’88. blah. In the ’90s blah. He’s in his ‘90s’ now.</p>
<p>Happened in ’89.</p>
<p>in ’89</p>
<p>in ’89 </p>
<p>Happened in ’89. it did.</p>
<p>File ‘1.png’. ‘1.’ ‘1’ ‘10m’ ‘1.txt’</p>
<p><abbr title="North Atlantic Treaty Organisation"><span class="caps">NATO</span></abbr>’s pretty big.</p>
<p><abbr title=""><span class="caps">ABC</span></abbr>’s poor knees.</p>
<p><span class="caps">ABC</span>(‘s poor knees.</p>
<p><span class="caps">ABC</span>)’s poor knees.</p>
<p>Here is a <span class="example">‘spanned’</span> word.</p>
<p>The <abbr title="National Health Service"><span class="caps">NHS</span></abbr>’ charter states…</p>
Dashes and ellipsis :
notes : |
'--' should be replaced with em-dash, ' - ' with en-dash (but not inside another sequence of characters) and '...' with elipsis.
input : |
You know the Italian proverb -- Chi ha compagno ha padrone.
You know the Italian proverb--Chi ha compagno ha padrone.
You know the Italian proverb - Chi ha compagno ha padrone.
You know the Italian proverb-Chi ha compagno ha padrone.
You know the Italian proverb... Chi ha compagno ha padrone.
You know the Italian proverb...Chi ha compagno ha padrone.
expect : |
<p>You know the Italian proverb — Chi ha compagno ha padrone.</p>
<p>You know the Italian proverb—Chi ha compagno ha padrone.</p>
<p>You know the Italian proverb – Chi ha compagno ha padrone.</p>
<p>You know the Italian proverb-Chi ha compagno ha padrone.</p>
<p>You know the Italian proverb… Chi ha compagno ha padrone.</p>
<p>You know the Italian proverb…Chi ha compagno ha padrone.</p>
Notextile :
input : |
==*no* <b>textile</b>==
==
This text should never,
ever, ever, ever, ever
be "textiled(tm)"!
==
But "this(tm)" should be whilst, yet again, >==this(tm)==< should _not_!
notextile. * item 1
* item 2
notextile.. *long*
*block*
expect : |
<p>*no* <b>textile</b></p>
<p>
This text should never,
ever, ever, ever, ever
be "textiled(tm)"!
</p>
<p>But “this™” should be whilst, yet again, >this(tm)< should <em>not</em>!</p>
* item 1
* item 2
*long*
*block*
Pre-formatted content:
input : |
pre. *This* _should_ not be parsed.
pre.. * item 1
* item 2
* item 3
p. Paragraph.
<pre>sdada <a href="link">Link</a> @code@ dadsada</pre>
expect : |
<pre>*This* _should_ not be parsed.</pre>
<pre>* item 1
* item 2
* item 3</pre>
<p>Paragraph.</p>
<pre>sdada <a href="link">Link</a> <code>code</code> dadsada</pre>
Tricky Open Quotes... :
input : |
citation ["(Berk.) Hilton"], see
[Papers "blah blah."]
Hello ("Mum")...
Hello ["(mum) & dad"], see...
Hello ("[mum] & dad"), see...
Hello {"(mum) & dad"}, see...
["Well, well (well)"] ...
citation ['(Berk.) Hilton'], see
[Papers "blah blah."]
Hello ('Mum')...
Hello ['(mum) & dad'], see...
Hello ('[mum] & dad'), see...
Hello {'(mum) & dad'}, see...
['Well, well (well)'] ...
expect: |
<p>citation [“(Berk.) Hilton”], see<br>
[Papers “blah blah.”]</p>
<p>Hello (“Mum”)…</p>
<p>Hello [“(mum) & dad”], see…</p>
<p>Hello (“[mum] & dad”), see…</p>
<p>Hello {“(mum) & dad”}, see…</p>
<p>[“Well, well (well)”] …</p>
<p>citation [‘(Berk.) Hilton’], see<br>
[Papers “blah blah.”]</p>
<p>Hello (‘Mum’)…</p>
<p>Hello [‘(mum) & dad’], see…</p>
<p>Hello (‘[mum] & dad’), see…</p>
<p>Hello {‘(mum) & dad’}, see…</p>
<p>[‘Well, well (well)’] …</p>
Headers 1-6 :
input : |
h1. Heading 1
h2. Heading 2.
h3. Heading 3..
h4. Heading 4...
h5. Heading 5....
h6. Heading 6.....
h1. Two line with *strong*
heading
h1=. Centered headline
expect : |
<h1>Heading 1</h1>
<h2>Heading 2.</h2>
<h3>Heading 3..</h3>
<h4>Heading 4…</h4>
<h5>Heading 5….</h5>
<h6>Heading 6…..</h6>
<h1>Two line with <strong>strong</strong><br>
heading</h1>
<h1 style="text-align:center;">Centered headline</h1>
Paragraph text :
notes : Paragraphs should be properly wrapped in <p>...</p> tags and newlines replaced with <br /> tags.
input : |
A paragraph.
Another paragraph.
A paragraph with
a line break.
Here's some <b>bold</b> text.
expect : |
<p>A paragraph.</p>
<p>Another paragraph.</p>
<p>A paragraph with<br>
a line break.</p>
<p>Here’s some <b>bold</b> text.</p>
Paragraph with attributes:
input : |
p(class#id)[en-us]{color: blue;}. (also applied by default)
expect : |
<p class="class" id="id" lang="en-us" style="color: blue;">(also applied by default)</p>
Paragraphs with alignment :
input : |
p<. Left-aligned paragraph.
p>. Right-aligned paragraph.
p<>. Forasmuch as many have taken in hand to set forth in order a declaration of those things which are most surely believed among us, even as they delivered them unto us, which from the beginning were eyewitnesses, and ministers of the word; it seemed good to me also, having had perfect understanding of all things from the very first, to write unto thee in order, most excellent Theophilus, that thou mightest know the certainty of those things, wherein thou hast been instructed.
p=. Centered paragraph.
p<. Not left-aligned.
p>. Not right-aligned.
p<>. Not justified.
expect : |
<p style="text-align:left;">Left-aligned paragraph.</p>
<p style="text-align:right;">Right-aligned paragraph.</p>
<p style="text-align:justify;">Forasmuch as many have taken in hand to set forth in order a declaration of those things which are most surely believed among us, even as they delivered them unto us, which from the beginning were eyewitnesses, and ministers of the word; it seemed good to me also, having had perfect understanding of all things from the very first, to write unto thee in order, most excellent Theophilus, that thou mightest know the certainty of those things, wherein thou hast been instructed.</p>
<p style="text-align:center;">Centered paragraph.</p>
<p>p<. Not left-aligned.</p>
<p>p>. Not right-aligned.</p>
<p>p<>. Not justified.</p>
Paragraphs with padding :
input : |
p((((((((((. Left pad 10em.
p)). Right pad 2em.
p((())). Left and right pad 3em.
expect : |
<p style="padding-left:10em;">Left pad 10em.</p>
<p style="padding-right:2em;">Right pad 2em.</p>
<p style="padding-left:3em; padding-right:3em;">Left and right pad 3em.</p>
Nested block modifiers :
input : |
_*^Here^ -is a- +are two+ things.*_
A[*bold*]word. End-of-line __italic__.
*_^Here^ -is a- +are two+ things._*
_*em ^strong^*_ __**??&??**__ *_strong ~em~_*
expect: |
<p><em><strong><sup>Here</sup> <del>is a</del> <ins>are two</ins> things.</strong></em></p>
<p>A<strong>bold</strong>word. End-of-line <i>italic</i>.</p>
<p><strong><em><sup>Here</sup> <del>is a</del> <ins>are two</ins> things.</em></strong></p>
<p><em><strong>em <sup>strong</sup></strong></em> <i><b><cite>&</cite></b></i> <strong><em>strong <sub>em</sub></em></strong></p>
Spans in table cells :
input: |
| *strong* |
| _em_ |
| Inter-word -dashes- | ZIP-codes are 5- or 9-digit codes | Hello ??<a href="https://github.com">Github</a>!?? |
expect: |
<table>
<tr>
<td> <strong>strong</strong> </td>
</tr>
</table>
<table>
<tr>
<td> <em>em</em> </td>
</tr>
</table>
<table>
<tr>
<td> Inter-word <del>dashes</del> </td>
<td> <span class="caps">ZIP</span>-codes are 5- or 9-digit codes </td>
<td> Hello <cite><a href="https://github.com">Github</a>!</cite> </td>
</tr>
</table>
Parenthesised block modifiers :
input : |
Simple solutions (_*are* the_ best) [for _Komplex(tm)_ people].
Both (*strong*), and (_emphasis_) will be rendered with formatting.
Both [[*strong*]], and [[_emphasis_]] will be rendered with formatting.
expect : |
<p>Simple solutions (<em><strong>are</strong> the</em> best) [for <em>Komplex™</em> people].</p>
<p>Both (<strong>strong</strong>), and (<em>emphasis</em>) will be rendered with formatting.</p>
<p>Both [<strong>strong</strong>], and [<em>emphasis</em>] will be rendered with formatting.</p>
Well formed HTML :
notes : Paragraphs that consist entirely of raw XHTML block tags will not be enclosed in <p>...</p> tags.
input : |
<div class="foo">
<span>blah</span>
</div>
expect : |
<div class="foo">
<span>blah</span>
</div>
Partial XHTML spans :
notes: XHTML tags that enclose only part of a block of text will be left intact, BUT the whole block itself will be treated normally.
input: |
<b>bold</b> and <i>italic</i>, the hard way.
expect : |
<p><b>bold</b> and <i>italic</i>, the hard way.</p>
HTML Comments :
input: |
Here is some text with a <!-- Commented out[1] --> block.
<!-- Here is a single <span>line</span> comment block -->
<!-- Here is a whole
multiline
<span>HTML</span>
Comment
-->
bc. <!-- Here is a comment block in a code block. -->
expect: |
<p>Here is some text with a <!-- Commented out[1] --> block.</p>
<!-- Here is a single <span>line</span> comment block -->
<!-- Here is a whole
multiline
<span>HTML</span>
Comment
-->
<pre><code><!-- Here is a comment block in a code block. --></code></pre>
HTML Comments (restricted):
setup:
setRestricted: true
setLite: true
setImages: false
setLinkRelationShip: nofollow
input: |
Here is some text with a <!-- Commented out --> block.
<!-- Here is a single <span>line</span> comment block -->
<!-- Here is a whole
multiline
<span>HTML</span>
Comment
-->
pre. <!-- Here is a comment block in a pre block. -->
expect: |
<p>Here is some text with a <!— Commented out —> block.</p>
<p><!— Here is a single <span>line</span> comment block —></p>
<p><!— Here is a whole<br>
multiline<br>
<span><span class="caps">HTML</span></span><br>
Comment<br>
—></p>
<p>pre. <!— Here is a comment block in a pre block. —></p>
URLs as non-links :
notes : Straight URL text sequences should not be converted to a hyperlink.
input : |
http://cnn.com
"http://cnn.com"
"http://cnn.com(is a website)"
expect : |
<p>http://cnn.com</p>
<p>“http://cnn.com”</p>
<p>“http://cnn.com(is a website)”</p>
URI-Schemes :
input : |
"link with no scheme":textileit.com
"link with http":http://textileit.com
"link with https":https://textileit.com
"link with ftp":ftp://textileit.com
"link with ftp alias":uri-alias4
"link with sftp":sftp://foobar@textileit.com
"$":sftp://foobar@textileit.com
"link with no scheme"://example.com
Find it "here":http://github.com/netcarver/some+thing+completely+different on github.
"link with sftp alias":uri-alias3
"link with file1":file://host.example.com/folder/file.ext
"$":file://host.example.com/folder/file.ext
"link with file2":file:///c:/folder/file.ext
"link with file alias":uri-alias2
"$":file:///c:/folder/file.ext
"link with tel":tel:123123123123123123-123
"$":tel:123123123123123123-123
"int tel":uri-alias1
"link with mailto":mailto:contact+alt@textileit.com
"link with mailto alias":uri-alias6
"link with callto":callto:textileit.com
"link with callto alias":uri-alias5
"$":callto:textileit.com
[uri-alias1]tel:+123-0-123123123-123
[uri-alias2]file:///c:/folder/file.ext
[uri-alias3]sftp://foo@bar.net
[uri-alias4]ftp://foo@bar.net
[uri-alias5]callto:textileit.com
[uri-alias6]mailto:contact@textileit.com
expect : |
<p><a href="textileit.com">link with no scheme</a></p>
<p><a href="http://textileit.com/">link with http</a></p>
<p><a href="https://textileit.com/">link with https</a></p>
<p><a href="ftp://textileit.com/">link with ftp</a></p>
<p><a href="ftp://foo@bar.net/">link with ftp alias</a></p>
<p><a href="sftp://foobar@textileit.com">link with sftp</a></p>
<p><a href="sftp://foobar@textileit.com">foobar@textileit.com</a></p>
<p><a href="//example.com">link with no scheme</a></p>
<p>Find it <a href="http://github.com/netcarver/some+thing+completely+different">here</a> on github.</p>
<p><a href="sftp://foo@bar.net">link with sftp alias</a></p>
<p><a href="file://host.example.com/folder/file.ext">link with file1</a></p>
<p><a href="file://host.example.com/folder/file.ext">host.example.com/folder/file.ext</a></p>
<p><a href="file:///c:/folder/file.ext">link with file2</a></p>
<p><a href="file:///c:/folder/file.ext">link with file alias</a></p>
<p><a href="file:///c:/folder/file.ext">/c:/folder/file.ext</a></p>
<p><a href="tel:123123123123123123-123">link with tel</a></p>
<p><a href="tel:123123123123123123-123">123123123123123123-123</a></p>
<p><a href="tel:+123-0-123123123-123">int tel</a></p>
<p><a href="mailto:contact+alt@textileit.com">link with mailto</a></p>
<p><a href="mailto:contact@textileit.com">link with mailto alias</a></p>
<p><a href="callto:textileit.com">link with callto</a></p>
<p><a href="callto:textileit.com">link with callto alias</a></p>
<p><a href="callto:textileit.com">textileit.com</a></p>
Self-Hyperlink :
notes : A new feature.
input : |
Relative link to "$":testit.php?testfilename=textile/basic.
Relative link to "$":/testit.php?testfilename=textile/basic.
Send spam to "$":mailto://blackhole@sun.comet please!
An auto-hyperlink to "$":http://mojomojo.org/documentation/textile_vs_markdown#Textile2_vs._MultiMarkdown is -not- possible.
An auto-hyperlink (with title) to "$(Comparison of Textile2 and Markdown)":http://mojomojo.org/documentation/textile_vs_markdown#Textile2_vs._MultiMarkdown is -not- possible.
An auto-hyperlink (with atts) to "(class#id)[en-au]$(Comparison of Textile2 and Markdown)":http://mojomojo.org/documentation/textile_vs_markdown#Textile2_vs._MultiMarkdown is -not- possible.
expect : |
<p>Relative link to <a href="testit.php?testfilename=textile/basic">testit.php?testfilename=textile/basic</a>.</p>
<p>Relative link to <a href="/testit.php?testfilename=textile/basic">/testit.php?testfilename=textile/basic</a>.</p>
<p>Send spam to <a href="mailto://blackhole@sun.comet">blackhole@sun.comet</a> please!</p>
<p>An auto-hyperlink to <a href="http://mojomojo.org/documentation/textile_vs_markdown#Textile2_vs._MultiMarkdown">mojomojo.org/documentation/textile_vs_markdown#Textile2_vs._MultiMarkdown</a> is <del>not</del> possible.</p>
<p>An auto-hyperlink (with title) to <a href="http://mojomojo.org/documentation/textile_vs_markdown#Textile2_vs._MultiMarkdown" title="Comparison of Textile2 and Markdown">mojomojo.org/documentation/textile_vs_markdown#Textile2_vs._MultiMarkdown</a> is <del>not</del> possible.</p>
<p>An auto-hyperlink (with atts) to <a class="class" href="http://mojomojo.org/documentation/textile_vs_markdown#Textile2_vs._MultiMarkdown" id="id" lang="en-au" title="Comparison of Textile2 and Markdown">mojomojo.org/documentation/textile_vs_markdown#Textile2_vs._MultiMarkdown</a> is <del>not</del> possible.</p>
Links :
input : |
"link text":http://example.com
"link text":http://example.com.
"link text":http://example.com,
"link text":http://example.com?
"link text":http://example.com:
"link text":http://example.com:80
"link text":http://example.com;
"link text":http://example.com|
"link text":http://example.com*
"link text":http://example.com/
"link text":http://example.com/.
"link text":http://example.com/,
"link text":http://example.com/?
"link text":http://example.com/:
"link text":http://example.com/:80
"link text":http://example.com/;
"link text":http://example.com/|
"link text":http://example.com/*
("link text":http://example.com)
("link text":http://example.com/)
(Try "this link":http://example.com/)
("link text":http://example.com/ go go go!)
"link text":/example
"link text(with title)":http://example.com/
"(this is not a title)":http://example.com/
Here is "a link":0, and "another link":0 to a site.
[0]http://thresholdstate.com/
Here is "a link":ts, and "another link":ts to the same site.
[ts]http://thresholdstate.com/
"link text(with title)":https://example.com/
"link text(with title)":ftp://example.com/
"link text(with title)":mailto:contact@example.com
"(class#id)[de-de]$(title)":http://textpattern.com
"(class#id)[en-gb]{text-transform:uppercase}Try this link(Link title)":http://textile.sitemonks.com
"(linkclass#linkid)[de-de]!(imgclass#imgid)imgurl(img/link text)!(Link Title)":linkurl
"Tcl":../html/tcltk.html
"(myclass) (just in case you were wondering)":http://slashdot.org/
"Participar (para) poder":http://www.unicef.org/argentina/spanish/cartilla_3(1).pdf
expect : |
<p><a href="http://example.com/">link text</a></p>
<p><a href="http://example.com/">link text</a>.</p>
<p><a href="http://example.com/">link text</a>,</p>
<p><a href="http://example.com/">link text</a>?</p>
<p><a href="http://example.com/">link text</a>:</p>
<p><a href="http://example.com/">link text</a></p>
<p><a href="http://example.com/">link text</a>;</p>
<p><a href="http://example.com/">link text</a>|</p>
<p><a href="http://example.com/">link text</a>*</p>
<p><a href="http://example.com/">link text</a></p>
<p><a href="http://example.com/">link text</a>.</p>
<p><a href="http://example.com/">link text</a>,</p>
<p><a href="http://example.com/">link text</a>?</p>
<p><a href="http://example.com/">link text</a>:</p>
<p><a href="http://example.com/:80">link text</a></p>
<p><a href="http://example.com/">link text</a>;</p>
<p><a href="http://example.com/">link text</a>|</p>
<p><a href="http://example.com/">link text</a>*</p>
<p>(<a href="http://example.com/">link text</a>)</p>
<p>(<a href="http://example.com/">link text</a>)</p>
<p>(Try <a href="http://example.com/">this link</a>)</p>
<p>(<a href="http://example.com/">link text</a> go go go!)</p>
<p><a href="/example">link text</a></p>
<p><a href="http://example.com/" title="with title">link text</a></p>
<p><a href="http://example.com/">(this is not a title)</a></p>
<p>Here is <a href="http://thresholdstate.com/">a link</a>, and <a href="http://thresholdstate.com/">another link</a> to a site.</p>
<p>Here is <a href="http://thresholdstate.com/">a link</a>, and <a href="http://thresholdstate.com/">another link</a> to the same site.</p>
<p><a href="https://example.com/" title="with title">link text</a></p>
<p><a href="ftp://example.com/" title="with title">link text</a></p>
<p><a href="mailto:contact@example.com" title="with title">link text</a></p>
<p><a class="class" href="http://textpattern.com/" id="id" lang="de-de" title="title">textpattern.com</a></p>
<p><a class="class" href="http://textile.sitemonks.com/" id="id" lang="en-gb" style="text-transform:uppercase;" title="Link title">Try this link</a></p>
<p><a class="linkclass" href="linkurl" id="linkid" lang="de-de" title="Link Title"><img alt="img/link text" class="imgclass" id="imgid" src="imgurl" title="img/link text" /></a></p>
<p><a href="../html/tcltk.html">Tcl</a></p>
<p><a class="myclass" href="http://slashdot.org/">(just in case you were wondering)</a></p>
<p><a href="http://www.unicef.org/argentina/spanish/cartilla_3(1).pdf">Participar (para) poder</a></p>
Unicode Links :
input : |
"Übermensch":https://de.wikipedia.org/wiki/Übermensch
"$":https://de.wikipedia.org/wiki/Übermensch
"福島駅":link5 this is a test -- no trailing slash.
[link5]http://ja.wikipedia.org/wiki/福島駅_(大阪府)
"äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ without trailing slash":link3
[link3]https://en.wikipedia.com/ä/öüÄÖÜßç/éáóúè/àòùÉÁÓÚ/ÈÀÒÙêÊôÔâÂû/ÛåÅœŒæÆøØëËïÏ
"äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ without trailing slash":https://en.wikipedia.com/ä/öüÄÖÜßç/éáóúè/àòùÉÁÓÚ/ÈÀÒÙêÊôÔâÂû/ÛåÅœŒæÆøØëËïÏ
"福島駅":link6 this is a test -- with a trailing slash.
[link6]http://ja.wikipedia.org/wiki/福島駅_(大阪府)/
"äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ with trailing slash":link4
[link4]https://en.wikipedia.com/ä/öüÄÖÜßç/éáóúè/àòùÉÁÓÚ/ÈÀÒÙêÊôÔâÂû/ÛåÅœŒæÆøØëËïÏ/
"äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ with trailing slash":https://en.wikipedia.com/ä/öüÄÖÜßç/éáóúè/àòùÉÁÓÚ/ÈÀÒÙêÊôÔâÂû/ÛåÅœŒæÆøØëËïÏ/
"Google":link1 or "secure google":link2
[link1]http://google.com
[link2]https://google.com
expect : |
<p><a href="https://de.wikipedia.org/wiki/%C3%9Cbermensch">Übermensch</a></p>
<p><a href="https://de.wikipedia.org/wiki/%C3%9Cbermensch">de.wikipedia.org/wiki/Übermensch</a></p>
<p><a href="http://ja.wikipedia.org/wiki/%E7%A6%8F%E5%B3%B6%E9%A7%85_(%E5%A4%A7%E9%98%AA%E5%BA%9C)">福島駅</a> this is a test — no trailing slash.</p>
<p><a href="https://en.wikipedia.com/%C3%A4/%C3%B6%C3%BC%C3%84%C3%96%C3%9C%C3%9F%C3%A7/%C3%A9%C3%A1%C3%B3%C3%BA%C3%A8/%C3%A0%C3%B2%C3%B9%C3%89%C3%81%C3%93%C3%9A/%C3%88%C3%80%C3%92%C3%99%C3%AA%C3%8A%C3%B4%C3%94%C3%A2%C3%82%C3%BB/%C3%9B%C3%A5%C3%85%C5%93%C5%92%C3%A6%C3%86%C3%B8%C3%98%C3%AB%C3%8B%C3%AF%C3%8F">äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ without trailing slash</a></p>
<p><a href="https://en.wikipedia.com/%C3%A4/%C3%B6%C3%BC%C3%84%C3%96%C3%9C%C3%9F%C3%A7/%C3%A9%C3%A1%C3%B3%C3%BA%C3%A8/%C3%A0%C3%B2%C3%B9%C3%89%C3%81%C3%93%C3%9A/%C3%88%C3%80%C3%92%C3%99%C3%AA%C3%8A%C3%B4%C3%94%C3%A2%C3%82%C3%BB/%C3%9B%C3%A5%C3%85%C5%93%C5%92%C3%A6%C3%86%C3%B8%C3%98%C3%AB%C3%8B%C3%AF%C3%8F">äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ without trailing slash</a></p>
<p><a href="http://ja.wikipedia.org/wiki/%E7%A6%8F%E5%B3%B6%E9%A7%85_(%E5%A4%A7%E9%98%AA%E5%BA%9C)/">福島駅</a> this is a test — with a trailing slash.</p>
<p><a href="https://en.wikipedia.com/%C3%A4/%C3%B6%C3%BC%C3%84%C3%96%C3%9C%C3%9F%C3%A7/%C3%A9%C3%A1%C3%B3%C3%BA%C3%A8/%C3%A0%C3%B2%C3%B9%C3%89%C3%81%C3%93%C3%9A/%C3%88%C3%80%C3%92%C3%99%C3%AA%C3%8A%C3%B4%C3%94%C3%A2%C3%82%C3%BB/%C3%9B%C3%A5%C3%85%C5%93%C5%92%C3%A6%C3%86%C3%B8%C3%98%C3%AB%C3%8B%C3%AF%C3%8F/">äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ with trailing slash</a></p>
<p><a href="https://en.wikipedia.com/%C3%A4/%C3%B6%C3%BC%C3%84%C3%96%C3%9C%C3%9F%C3%A7/%C3%A9%C3%A1%C3%B3%C3%BA%C3%A8/%C3%A0%C3%B2%C3%B9%C3%89%C3%81%C3%93%C3%9A/%C3%88%C3%80%C3%92%C3%99%C3%AA%C3%8A%C3%B4%C3%94%C3%A2%C3%82%C3%BB/%C3%9B%C3%A5%C3%85%C5%93%C5%92%C3%A6%C3%86%C3%B8%C3%98%C3%AB%C3%8B%C3%AF%C3%8F/">äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ with trailing slash</a></p>
<p><a href="http://google.com/">Google</a> or <a href="https://google.com/">secure google</a></p>
Self-referencing link alias :
input : |
Here is "$":0, and "another link":0, to the ^["$":0]^ site.
[0]http://thresholdstate.com/?q=true
Please check on "$":4 for any updates.
[4]https://de.wikipedia.org/wiki/Übermensch
expect : |
<p>Here is <a href="http://thresholdstate.com/?q=true">thresholdstate.com/?q=true</a>, and <a href="http://thresholdstate.com/?q=true">another link</a>, to the <sup><a href="http://thresholdstate.com/?q=true">thresholdstate.com/?q=true</a></sup> site.</p>
<p>Please check on <a href="https://de.wikipedia.org/wiki/%C3%9Cbermensch">de.wikipedia.org/wiki/Übermensch</a> for any updates.</p>
Non-whitelisted link schemes :
input : |
"I'm a bad link":parp://parp.com
expect : |
<p>“I’m a bad link”:parp://parp.com</p>
Mixed XHTML and Textile Links :
assert : skip
notes : >
Reported here... http://forum.textpattern.com/viewtopic.php?pid=157506#p157506
input : |
<a href="http://example.org" title="_dummy">example.org</a> _word_ abc
expect : |
<p><a href="http://example.org" title="_dummy">example.org</a> <em>word</em> abc</p>
Links with quoted text :
notes : >
Single quotes link text are fine, but double quotes break the link. Use " in this case.
input : |
"How free markets 'address' health care(title)":http://krugman.blogs.nytimes.com/2009/07/25/why-markets-cant-cure-healthcare/
"How free markets "address" health care(title)":http://krugman.blogs.nytimes.com/2009/07/25/why-markets-cant-cure-healthcare/
expect : |
<p><a href="http://krugman.blogs.nytimes.com/2009/07/25/why-markets-cant-cure-healthcare/" title="title">How free markets ‘address’ health care</a></p>
<p><a href="http://krugman.blogs.nytimes.com/2009/07/25/why-markets-cant-cure-healthcare/" title="title">How free markets "address" health care</a></p>
Image :
input : |
!http://textpattern.com/favicon.ico!
!<http://textpattern.com/favicon.ico!
!>http://textpattern.com/favicon.ico!
expect : |
<p><img alt="" src="http://textpattern.com/favicon.ico" /></p>
<p><img alt="" class="align-left" src="http://textpattern.com/favicon.ico" /></p>
<p><img alt="" class="align-right" src="http://textpattern.com/favicon.ico" /></p>
Image in XHTML :
setup:
setHtmlType: xhtml
input : |
!http://textpattern.com/favicon.ico!
!<http://textpattern.com/favicon.ico!
!>http://textpattern.com/favicon.ico!
expect : |
<p><img alt="" src="http://textpattern.com/favicon.ico" /></p>
<p><img align="left" alt="" src="http://textpattern.com/favicon.ico" /></p>
<p><img align="right" alt="" src="http://textpattern.com/favicon.ico" /></p>
Relative Images (default) :
input : |
!https://en.wikipedia.org/favicon.ico!
expect : |
<p><img alt="" height="48" src="https://en.wikipedia.org/favicon.ico" width="48" /></p>
setup:
setGettingImageSize: true
Relative Images (responsive) :
input : |
!10x10.gif!
expect : |
<p><img alt="" src="10x10.gif" /></p>
Unicode image src, alt and title :
input : |
!大阪府.png(大阪府)!
expect : |
<p><img alt="大阪府" src="大阪府.png" title="大阪府" /></p>
Images with links :
input : |
Here's the favicon from the TXP(Textpattern) website... !http://textpattern.com/favicon.ico(title text)!:http://textpattern.com
Again, this time left aligned. !<(class#id1)http://textpattern.com/favicon.ico(title text)!:http://textpattern.com
And again, to the right! !>(class#id2)http://textpattern.com/favicon.ico(title text)!:http://textpattern.com
expect : |
<p>Here’s the favicon from the <abbr title="Textpattern"><span class="caps">TXP</span></abbr> website… <a href="http://textpattern.com/"><img alt="title text" src="http://textpattern.com/favicon.ico" title="title text" /></a></p>
<p>Again, this time left aligned. <a href="http://textpattern.com/"><img alt="title text" class="class align-left" id="id1" src="http://textpattern.com/favicon.ico" title="title text" /></a></p>
<p>And again, to the right! <a href="http://textpattern.com/"><img alt="title text" class="class align-right" id="id2" src="http://textpattern.com/favicon.ico" title="title text" /></a></p>
Embedded acronym inside acronym:
input : |
Tell me, what is AJAX(Asynchronous Javascript and XML), please?
expect : |
<p>Tell me, what is <abbr title="Asynchronous Javascript and XML"><span class="caps">AJAX</span></abbr>, please?</p>
Heading with class & id:
input: |
h2(heading#head). Hello!
expect: |
<h2 class="heading" id="head">Hello!</h2>
Issue 71 - Emphasis:
notes : |
Tests conversion to apostrophe-s at the end of block modifiers. http://code.google.com/p/textpattern/issues/detail?id=71
input : |
_Newsweek_'s a problem.
"_Newsweek_'s a problem."
"_Newsweek_'s a problem."
"_Newsweek_'s" a problem.
*Newsweek*'s a problem.
"*Newsweek*'s a problem."
"*Newsweek*'s a problem."
"*Newsweek*'s" a problem.
"*Newsweek*'s"
a problem.
-Newsweek-'s a problem.
expect: |
<p><em>Newsweek</em>’s a problem.</p>
<p>“<em>Newsweek</em>’s a problem.”</p>
<p>“<em>Newsweek</em>’s a problem.”</p>
<p>“<em>Newsweek</em>’s” a problem.</p>
<p><strong>Newsweek</strong>’s a problem.</p>
<p>“<strong>Newsweek</strong>’s a problem.”</p>
<p>“<strong>Newsweek</strong>’s a problem.”</p>
<p>“<strong>Newsweek</strong>’s” a problem.</p>
<p>“<strong>Newsweek</strong>’s”<br>
a problem.</p>
<p><del>Newsweek</del>’s a problem.</p>
Single quotes 1:
input : |
'Here is a quote!'
'Here is another
quote!'
expect: |
<p>‘Here is a quote!’</p>
<p>‘Here is another<br>
quote!’</p>
Single quotes enclosing normal apostrophes 1:
input : |
'Here's a quote!'
'Here's another
quote!'
expect: |
<p>‘Here’s a quote!’</p>
<p>‘Here’s another<br>
quote!’</p>
Single quotes enclosing normal apostrophes + emphasis:
input : |
'Here's a _quote_!'
'Here's a
_quote_!'
expect: |
<p>‘Here’s a <em>quote</em>!’</p>
<p>‘Here’s a<br>
<em>quote</em>!’</p>
Single quotes enclosing italic apostrophes:
input : |
'__Here__'s a quote!'
'__Here__'s
a quote!'
expect: |
<p>‘<i>Here</i>’s a quote!’</p>
<p>‘<i>Here</i>’s<br>
a quote!’</p>
Link in quotes. :
input : |
"Here's a "(class#id)link(with a title)":http://cnn.com?a=b&c=d#end_of_page."
expect : |
<p>“Here’s a <a class="class" href="http://cnn.com/?a=b&c=d#end_of_page" id="id" title="with a title">link</a>.”</p>
Double quotes enclosing spans:
input : |
"Here's another one"
Well "%here's another one%"
Well "%+here+'s another one%"
Well "%*here*'s another one%"
Well "%_here_'s another one%"
Well "%(class#id)_here_'s another one%"
Well "%(class#id)_here_'s -yet _**another**_ ^example^ ~of~- *one*'s% "results":http://cnn.com. Howzat!" With "some *^more^* results":http://cnn.com
"Should _Newsweek_'s editor be spared?"
expect: |
<p>“Here’s another one”</p>
<p>Well “<span>here’s another one</span>”</p>
<p>Well “<span><ins>here</ins>’s another one</span>”</p>
<p>Well “<span><strong>here</strong>’s another one</span>”</p>
<p>Well “<span><em>here</em>’s another one</span>”</p>
<p>Well “<span class="class" id="id"><em>here</em>’s another one</span>”</p>
<p>Well “<span class="class" id="id"><em>here</em>’s <del>yet <em><b>another</b></em> <sup>example</sup> <sub>of</sub></del> <strong>one</strong>’s</span> <a href="http://cnn.com/">results</a>. Howzat!” With <a href="http://cnn.com/">some <strong><sup>more</sup></strong> results</a></p>
<p>“Should <em>Newsweek</em>’s editor be spared?”</p>
Single quotes or apostrophe? :
input : |
'should this quote start with an apostrophe?'
'"s" is my favourite letter!'
expect: |
<p>‘should this quote start with an apostrophe?’</p>
<p>‘“s” is my favourite letter!’</p>
Foreign character and quote support :
input : |
Ou est l'école, l'église s'il vous plâit?
I like l'entrées. Do you?
«Bonjour!» ecris Christophe. «Est-ce-que tu un petit café», he asked somewhat confusingly.
SÆLGES d'être
expect : |
<p>Ou est l’école, l’église s’il vous plâit?</p>
<p>I like l’entrées. Do you?</p>
<p>«Bonjour!» ecris Christophe. «Est-ce-que tu un petit café», he asked somewhat confusingly.</p>
<p><span class="caps">SÆLGES</span> d’être</p>
Code blocks, pre and exclusions :
input : |
bc(input). You can't _*touch*_ *_this_*... Hammer time.
And keep your @(expect)mitts _*off*_ *_me_*@ as well. About the @<hr />@ tag.
bc(block).. As for the stuff in my *bold*, _emphasised_ & __italic__ codeblock, I think you'll find these tags entertaining:
<txp:linklist />
<txp:image_list category="squid">
<txp:image class="prawns" something="summat else" />
<br />
<txp:image_info type="caption" />
</txp:category>
bc.. Code block
with three empty lines
p(regular#somestuff). _Aaaand_, *__relax__*.
bc.. Paragraph 1
Paragraph 2
Paragraph 3
expect : |
<pre class="input"><code>You can't _*touch*_ *_this_*... Hammer time.</code></pre>
<p>And keep your <code>(expect)mitts _*off*_ *_me_*</code> as well. About the <code><hr /></code> tag.</p>
<pre class="block"><code>As for the stuff in my *bold*, _emphasised_ & __italic__ codeblock, I think you'll find these tags entertaining:
<txp:linklist />
<txp:image_list category="squid">
<txp:image class="prawns" something="summat else" />
<br />
<txp:image_info type="caption" />
</txp:category></code></pre>
<pre><code>Code block
with three empty lines</code></pre>
<p class="regular" id="somestuff"><em>Aaaand</em>, <strong><i>relax</i></strong>.</p>
<pre><code>Paragraph 1
Paragraph 2
Paragraph 3</code></pre>
Basic span modifiers & glyphs:
input: |
This is the "start" and 'end'; and I'm stuck in '88!: With smd_g4llery's attributes where hëll_won't__fr33ze_over if I use apostrophes inside odd words and_underscores (Pah).
expect: |
<p>This is the “start” and ‘end’; and I’m stuck in ’88!: With smd_g4llery’s attributes where hëll_won’t__fr33ze_over if I use apostrophes inside odd words and_underscores (Pah).</p>
In-line citations :
input : |
A ??(myclass#myid4){color:green}[de-de]complex?? phrase.
expect : |
<p>A <cite class="myclass" id="myid4" lang="de-de" style="color:green;">complex</cite> phrase.</p>
Square-brackets :
input : |
1[^st^], 2[^nd^], 3[^rd^]. 2 log[~n~]
A close[!http://textpattern.com/favicon.ico!]image.
A tight["text":http://textpattern.com/]link.
A ["footnoted link":http://textpattern.com/][182].
expect : |
<p>1<sup>st</sup>, 2<sup>nd</sup>, 3<sup>rd</sup>. 2 log<sub>n</sub></p>
<p>A close<img alt="" src="http://textpattern.com/favicon.ico" />image.<br>
A tight<a href="http://textpattern.com/">text</a>link.<br>
A <a href="http://textpattern.com/">footnoted link</a><sup class="footnote" id="fnrevxyz-1"><a href="#fnxyz-1">182</a></sup>.</p>
Issue 50 Bust-a-quotes:
assert: skip
notes: >
This is issue 50 in the code tracker.
However, I don't think this is valid textile as it's a mix of XHTML and textile smartquotes.
If this is fully XHMTL, character entities should be used at the start and end of the string.
If it's textile, then it should be "%[en]test%" or %[en]"test"%.
input: |
"<span lang="en">test</span>"
expect: |
<p>“<span lang="en">test</span>”</p>
Issue 50 Fixes:
notes: >
Here are the possible rewrites for issue 50 that give the results the issue author was expecting.
input: |
“<span lang="en">test</span>”
"%[en]test%"
expect: |
<p>“<span lang="en">test</span>”</p>
<p>“<span lang="en">test</span>”</p>
Issue 1 ... Bold it - it bold :
input: |
Some italic bold _*aaaa*_ text? Some bold italic *_bbbb_* text?
expect: |
<p>Some italic bold <em><strong>aaaa</strong></em> text? Some bold italic <strong><em>bbbb</em></strong> text?</p>
Make sure these don't get turned into lists... :
input: |
*Here is a comment*
Here is *(class)a comment*
*(class)Here is a class* that is a little extended and is
*followed* by a strong word!
bc. ; Content-type: text/javascript
; Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0
; Expires: Sat, 24 Jul 2003 05:00:00 GMT
; Last-Modified: Wed, 1 Jan 2025 05:00:00 GMT
; Pragma: no-cache
*123 test*
*test 123*
**123 test**
**test 123**
expect: |
<p><strong>Here is a comment</strong></p>
<p>Here is <strong class="class">a comment</strong></p>
<p><strong class="class">Here is a class</strong> that is a little extended and is<br>
<strong>followed</strong> by a strong word!</p>
<pre><code>; Content-type: text/javascript
; Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0
; Expires: Sat, 24 Jul 2003 05:00:00 GMT
; Last-Modified: Wed, 1 Jan 2025 05:00:00 GMT
; Pragma: no-cache</code></pre>
<p><strong>123 test</strong></p>
<p><strong>test 123</strong></p>
<p><b>123 test</b></p>
<p><b>test 123</b></p>
Basic Ordered List:
setup:
setHtmlType: xhtml
input: |
# Ordered
# List
# Live
## Including
some newline
## And underlings
# ... aaaaand back out
p. And here we are with some _(alt)Other colours_
# red
## greeny
browny
pinkish
## black
# blue
expect: |
<ol>
<li>Ordered</li>
<li>List</li>
<li>Live
<ol>
<li>Including<br />
some newline</li>
<li>And underlings</li>
</ol></li>
<li>… aaaaand back out</li>
</ol>
<p>And here we are with some <em class="alt">Other colours</em></p>
<ol>
<li>red
<ol>
<li>greeny<br />
browny<br />
pinkish</li>
<li>black</li>
</ol></li>
<li>blue</li>
</ol>
Ordered Lists:
input: |
test
#_(first#list) one
# two
# three
test
#(ordered#list2).
# one
# two
# three
test
#_(class_4).
# four
# five
# six
test
#_ seven
# eight
# nine
test
# one
# two
# three
test
#22 22
# 23
# 24
expect: |
<p>test</p>
<ol class="first" id="list" start="1">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<p>test</p>
<ol class="ordered" id="list2">
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<p>test</p>
<ol class="class_4" start="4">
<li>four</li>
<li>five</li>
<li>six</li>
</ol>
<p>test</p>
<ol start="7">
<li>seven</li>
<li>eight</li>
<li>nine</li>
</ol>
<p>test</p>
<ol>
<li>one</li>
<li>two</li>
<li>three</li>
</ol>
<p>test</p>
<ol start="22">
<li>22</li>
<li>23</li>
<li>24</li>
</ol>
Multi-level ordered list with continuation:
input: |
test
# one
##3 one.three
## one.four
## one.five
# two
test
#_(continuation#section2).
# three
# four
##_ four.six
## four.seven
# five
test
#21 twenty-one
# twenty-two
expect: |
<p>test</p>
<ol>
<li>one
<ol start="3">
<li>one.three</li>
<li>one.four</li>
<li>one.five</li>
</ol></li>
<li>two</li>
</ol>
<p>test</p>
<ol class="continuation" id="section2" start="3">
<li>three</li>
<li>four
<ol start="6">
<li>four.six</li>
<li>four.seven</li>
</ol></li>
<li>five</li>
</ol>
<p>test</p>
<ol start="21">
<li>twenty-one</li>
<li>twenty-two</li>
</ol>
Basic Unordered lists:
input: |
h3. How about some unordered goodness?
*(class) Bullet
* List
* Here
** With
** Subs
* and regulars
_colours_
* yellow
* cyan
expect: |
<h3>How about some unordered goodness?</h3>
<ul class="class">
<li>Bullet</li>
<li>List</li>
<li>Here
<ul>
<li>With</li>
<li>Subs</li>
</ul></li>
<li>and regulars</li>
</ul>
<p><em>colours</em></p>
<ul>
<li>yellow</li>
<li>cyan</li>
</ul>
Mixed lists:
input : |
test
* bullet
*# number
*# number
*#* bullet
*# number
*# number with
a break
* bullet
** okay
expect : |
<p>test</p>
<ul>
<li>bullet
<ol>
<li>number</li>
<li>number
<ul>
<li>bullet</li>
</ul></li>
<li>number</li>
<li>number with<br>
a break</li>
</ol></li>
<li>bullet
<ul>
<li>okay</li>
</ul></li>
</ul>
Issue 61... Spans in tables :
input : |
|_. Super |_. Fly |_. Table |
| first | ICL | 3 |
| second | IBM | 4 |
| third | Ordinary | 5 |
| fourth | Foreign EXPÓŅÉNTIAL | 6 |
expect : |
<table>
<tr>
<th>Super </th>
<th>Fly </th>
<th>Table </th>
</tr>
<tr>
<td> first </td>
<td> <span class="caps">ICL</span> </td>
<td> 3 </td>
</tr>
<tr>
<td> second </td>
<td> <span class="caps">IBM</span> </td>
<td> 4 </td>
</tr>
<tr>
<td> third </td>
<td> Ordinary </td>
<td> 5 </td>
</tr>
<tr>
<td> fourth </td>
<td> Foreign <span class="caps">EXPÓŅÉNTIAL</span> </td>
<td> 6 </td>
</tr>
</table>
Table alignments:
input: |
|_. attribute list |
|<. align left |
|>. align right|
|=. center |
|<>. justify me|
|^. valign top |
|~. bottom |
|_=. Grade |_=. Homeroom |_=. Type |_=. Tardy/Dismiss Time |_=. Student |
|=. 6 | Bates | Absent |=. - | Jones, Jeanne |
|=. 6 | O'Leary | Absent |=. - | Jones, Jackson |
|=. 7 | Garran | Absent |=. - | Jones, Lauren |
|=. 7 | Martin | Absent |=. - | Jones, Timothy |
|=. 7 | Martin | Tardy |=. 10:00 | Jones, John-Paul |
|=. 8 | Kast | Absent |=. - | Jones, Samuel |
|=. 8 | Woods | Absent |=. - | Jones, Evelyn |
expect: |
<table>
<tr>
<th>attribute list </th>
</tr>
<tr>
<td style="text-align:left;">align left </td>
</tr>
<tr>
<td style="text-align:right;">align right</td>
</tr>
<tr>
<td style="text-align:center;">center </td>
</tr>
<tr>
<td style="text-align:justify;">justify me</td>
</tr>
<tr>
<td style="vertical-align:top;">valign top </td>
</tr>
<tr>
<td style="vertical-align:bottom;">bottom </td>
</tr>
</table>
<table>
<tr>
<th style="text-align:center;">Grade </th>
<th style="text-align:center;">Homeroom </th>
<th style="text-align:center;">Type </th>
<th style="text-align:center;">Tardy/Dismiss Time </th>
<th style="text-align:center;">Student </th>
</tr>
<tr>
<td style="text-align:center;">6 </td>
<td> Bates </td>
<td> Absent </td>
<td style="text-align:center;">- </td>
<td> Jones, Jeanne </td>
</tr>
<tr>
<td style="text-align:center;">6 </td>
<td> O’Leary </td>
<td> Absent </td>
<td style="text-align:center;">- </td>
<td> Jones, Jackson </td>
</tr>
<tr>
<td style="text-align:center;">7 </td>
<td> Garran </td>
<td> Absent </td>
<td style="text-align:center;">- </td>
<td> Jones, Lauren </td>
</tr>
<tr>
<td style="text-align:center;">7 </td>
<td> Martin </td>
<td> Absent </td>
<td style="text-align:center;">- </td>
<td> Jones, Timothy </td>
</tr>
<tr>
<td style="text-align:center;">7 </td>
<td> Martin </td>
<td> Tardy </td>
<td style="text-align:center;">10:00 </td>
<td> Jones, John-Paul </td>
</tr>
<tr>
<td style="text-align:center;">8 </td>
<td> Kast </td>
<td> Absent </td>
<td style="text-align:center;">- </td>
<td> Jones, Samuel </td>
</tr>
<tr>
<td style="text-align:center;">8 </td>
<td> Woods </td>
<td> Absent </td>
<td style="text-align:center;">- </td>
<td> Jones, Evelyn </td>
</tr>
</table>
Table colgroups and captions:
input : |
|=. Testing colgroup and col syntax
|:\5. 80
|a|b|c|d|e|
|=. Testing colgroup and col syntax|
|:\5. 80|
|a|b|c|d|e|
|=. Testing colgroup and col syntax\x20
|:\5. 80\x20
|a|b|c|d|e|
|=. Testing colgroup and col syntax|\x20
|:\5. 80|\x20
|a|b|c|d|e|
|=. Testing colgroup and col syntax |\x20
|:\5. 80 |\x20
|a|b|c|d|e|\x20
expect : |
<table>
<caption>Testing colgroup and col syntax</caption>
<colgroup span="5" width="80">
</colgroup>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
<td>e</td>
</tr>
</table>
<table>
<caption>Testing colgroup and col syntax</caption>
<colgroup span="5" width="80">
</colgroup>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
<td>e</td>
</tr>
</table>
<table>
<caption>Testing colgroup and col syntax</caption>
<colgroup span="5" width="80">
</colgroup>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
<td>e</td>
</tr>
</table>
<table>
<caption>Testing colgroup and col syntax</caption>
<colgroup span="5" width="80">
</colgroup>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
<td>e</td>
</tr>
</table>
<table>
<caption>Testing colgroup and col syntax</caption>
<colgroup span="5" width="80">
</colgroup>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
<td>e</td>
</tr>
</table>
Complex table with row- and col-spans:
input: |
h4. A more complicated table
table(tableclass#tableid){color:blue}.
|_. table |_. more |_. badass |
|\3. Horizontal span of 3|
(firstrow). |first|HAL(open the pod bay doors)|1|
|some|{color:green}. styled|content|
|/2. spans 2 rows|this is|quite a|
| deep test | don't you think?|
(lastrow). |fifth|I'm a lumberjack|5|
|sixth| _*bold italics*_ |6|
expect : |
<h4>A more complicated table</h4>
<table class="tableclass" id="tableid" style="color:blue;">
<tr>
<th>table </th>
<th>more </th>
<th>badass </th>
</tr>
<tr>
<td colspan="3">Horizontal span of 3</td>
</tr>
<tr class="firstrow">
<td>first</td>
<td><abbr title="open the pod bay doors"><span class="caps">HAL</span></abbr></td>
<td>1</td>
</tr>
<tr>
<td>some</td>
<td style="color:green;">styled</td>
<td>content</td>
</tr>
<tr>
<td rowspan="2">spans 2 rows</td>
<td>this is</td>
<td>quite a</td>
</tr>
<tr>
<td> deep test </td>
<td> don’t you think?</td>
</tr>
<tr class="lastrow">
<td>fifth</td>
<td>I’m a lumberjack</td>
<td>5</td>
</tr>
<tr>
<td>sixth</td>
<td> <em><strong>bold italics</strong></em> </td>
<td>6</td>
</tr>
</table>
Lists in tables:
input: |
|* Foo[^2^]
* _bar_
* ~baz~ |
|#4 *Four*
# __Five__ |
|-(hot) coffee := Hot and black
-(hot#tea) tea := Also hot, but a little less black
-(cold) milk :=\x20
Nourishing beverage for baby cows.
Cold drink that goes great with cookies. =:
|
|* bullet
*# number
*# number
*#* bullet
*# number
*# number with
a break
* bullet
** okay |
expect: |
<table>
<tr>
<td><ul>
<li>Foo<sup>2</sup></li>
<li><em>bar</em></li>
<li><sub>baz</sub></li>
</ul></td>
</tr>
<tr>
<td><ol start="4">
<li><strong>Four</strong></li>
<li><i>Five</i></li>
</ol></td>
</tr>
<tr>
<td><dl>
<dt class="hot">coffee</dt>
<dd>Hot and black</dd>
<dt class="hot" id="tea">tea</dt>
<dd>Also hot, but a little less black</dd>
<dt class="cold">milk</dt>
<dd><p>Nourishing beverage for baby cows.<br>
Cold drink that goes great with cookies.</p></dd>
</dl></td>
</tr>
<tr>
<td><ul>
<li>bullet
<ol>
<li>number</li>
<li>number
<ul>
<li>bullet</li>
</ul></li>
<li>number</li>
<li>number with<br>
a break</li>
</ol></li>
<li>bullet
<ul>
<li>okay</li>
</ul></li>
</ul></td>
</tr>
</table>
Simple Definition lists:
input: |
;(class#id) Term 1
: Def 1
: Def 2
: Def 3
expect: |
<dl class="class" id="id">
<dt>Term 1</dt>
<dd>Def 1</dd>
<dd>Def 2</dd>
<dd>Def 3</dd>
</dl>
Redcloth Definition list:
input: |
-(hot) *coffee* := Hot _and_ black
-(hot#tea) tea := Also hot, but a little less black
-(cold) milk := Nourishing beverage for baby cows.
Cold drink that goes great with cookies. =:
-(hot) coffee := Hot and black
-(hot#tea) tea := Also hot, but a little less black
-(cold) milk :=\x20
Nourishing beverage for baby cows.
Cold drink that goes great with cookies. =:
- term := you can have line breaks
just like other lists
- line-spanning
term := hey, slick!
You can have multiple terms before a definition:
- textile
- fabric
- cloth := woven threads
expect: |
<dl>
<dt class="hot"><strong>coffee</strong></dt>
<dd>Hot <em>and</em> black</dd>
<dt class="hot" id="tea">tea</dt>
<dd>Also hot, but a little less black</dd>
<dt class="cold">milk</dt>
<dd>Nourishing beverage for baby cows.<br>
Cold drink that goes great with cookies.</dd>
</dl>
<dl>
<dt class="hot">coffee</dt>
<dd>Hot and black</dd>
<dt class="hot" id="tea">tea</dt>
<dd>Also hot, but a little less black</dd>
<dt class="cold">milk</dt>
<dd><p>Nourishing beverage for baby cows.<br>
Cold drink that goes great with cookies.</p></dd>
</dl>
<dl>
<dt>term</dt>
<dd>you can have line breaks<br>
just like other lists</dd>
<dt>line-spanning<br>
term</dt>
<dd>hey, slick!</dd>
</dl>
<p>You can have multiple terms before a definition:</p>
<dl>
<dt>textile</dt>
<dt>fabric</dt>
<dt>cloth</dt>
<dd>woven threads</dd>
</dl>
Complex definition list:
input: |
h2. A definition list
;(class#id) Term 1
: Def 1
: Def 2
: Def 3
;; Center
;; NATO(Why Em Cee Ayy)
:: Subdef 1
:: Subdef 2
;;; SubSub Term
::: SubSub Def 1
::: SubSub Def 2
::: Subsub Def 3
With newline
::: Subsub Def 4
:: Subdef 3
: DEF 4
; Term 2
: Another def
: And another
: One more
:: A def without a term
:: More defness
; Third term for good measure
: My definition of a boombastic jazz
expect: |
<h2>A definition list</h2>
<dl class="class" id="id">
<dt>Term 1</dt>
<dd>Def 1</dd>
<dd>Def 2</dd>
<dd>Def 3
<dl>
<dt>Center</dt>
<dt><abbr title="Why Em Cee Ayy"><span class="caps">NATO</span></abbr></dt>
<dd>Subdef 1</dd>
<dd>Subdef 2
<dl>
<dt>SubSub Term</dt>
<dd>SubSub Def 1</dd>
<dd>SubSub Def 2</dd>
<dd>Subsub Def 3<br>
With newline</dd>
<dd>Subsub Def 4</dd>
</dl></dd>
<dd>Subdef 3</dd>
</dl></dd>
<dd><span class="caps">DEF</span> 4</dd>
<dt>Term 2</dt>
<dd>Another def</dd>
<dd>And another</dd>
<dd>One more
<dl>
<dd>A def without a term</dd>
<dd>More defness</dd>
</dl></dd>
<dt>Third term for good measure</dt>
<dd>My definition of a boombastic jazz</dd>
</dl>
1-line blockquote :
input : |
bq. Don't suck the brown stuff off of 2 pence coins; it ain't chocolate.
expect : |
<blockquote>
<p>Don’t suck the brown stuff off of 2 pence coins; it ain’t chocolate.</p>
</blockquote>
1-line blockquote 2:
input : |
bq. Don't suck the **brown stuff(tm)** off of "2 pence":http://royalmint.gov.uk coins; it ain't chocolate.
expect : |
<blockquote>
<p>Don’t suck the <b>brown stuff™</b> off of <a href="http://royalmint.gov.uk/">2 pence</a> coins; it ain’t chocolate.</p>
</blockquote>
n-line blockquote:
input : |
bq.. Don't suck the **brown stuff(tm)** off of "2 pence":http://royalmint.gov.uk coins; it ain't chocolate.
p. That's all.
expect : |
<blockquote>
<p>Don’t suck the <b>brown stuff™</b> off of <a href="http://royalmint.gov.uk/">2 pence</a> coins; it ain’t chocolate.</p>
</blockquote>
<p>That’s all.</p>
Blockquote with citation source :
input : |
bq.:http://textism.com/ Text...
expect : |
<blockquote cite="http://textism.com/">
<p>Text…</p>
</blockquote>
All capitals comment post :
input : |
HELLO, I SEE YOU DON'T LIKE PEOPLE TO SHOUT. WHY?
expect : |
<p><span class="caps">HELLO</span>, I <span class="caps">SEE</span> <span class="caps">YOU</span> <span class="caps">DON</span>’T <span class="caps">LIKE</span> <span class="caps">PEOPLE</span> TO <span class="caps">SHOUT</span>. <span class="caps">WHY</span>?</p>
New tables :
input : |
|=(#captionola). My boombastic table caption. It must appear before the first thead/row
|^.
|_. thead-wrapped |_. column |
|~(footjob).
| tfoot-wrapped | column |
|-.
| tbody-wrapped | column |
| some more | columny goodness |
(colourful). | yet more | colourful rows |
| nothing much | here |
|-(nursery#rhyme).
| if we go down |=. to the woods today |
| we're sure of a | big surprise |
expect : |
<table>
<caption id="captionola">My boombastic table caption. It must appear before the first thead/row</caption>
<thead>
<tr>
<th>thead-wrapped </th>
<th>column </th>
</tr>
</thead>
<tfoot class="footjob">
<tr>
<td> tfoot-wrapped </td>
<td> column </td>
</tr>
</tfoot>
<tbody>
<tr>
<td> tbody-wrapped </td>
<td> column </td>
</tr>
<tr>
<td> some more </td>
<td> columny goodness </td>
</tr>
<tr class="colourful">
<td> yet more </td>
<td> colourful rows </td>
</tr>
<tr>
<td> nothing much </td>
<td> here </td>
</tr>
</tbody>
<tbody class="nursery" id="rhyme">
<tr>
<td> if we go down </td>
<td style="text-align:center;">to the woods today </td>
</tr>
<tr>
<td> we’re sure of a </td>
<td> big surprise </td>
</tr>
</tbody>
</table>
Simple table with newline in a cell:
setup:
setHtmlType: xhtml
input: |
|_. Attribute |_. Default Value |_. Description |
| 'order' |=. 'cdo' | Optional: order of sections. Omit or leave blank for default copyright-date-owner order.
Valid values: 'cdo', 'cod' |
expect: |
<table>
<tr>
<th>Attribute </th>
<th>Default Value </th>
<th>Description </th>
</tr>
<tr>
<td> ‘order’ </td>
<td style="text-align:center;">‘cdo’ </td>
<td> Optional: order of sections. Omit or leave blank for default copyright-date-owner order.<br />
Valid values: ‘cdo’, ‘cod’ </td>
</tr>
</table>
Tables with styles:
input: |
table(#dvds){border-collapse:collapse}. Great films on DVD employing Textile summary, caption, thead, tfoot, two tbody elements and colgroups
|={font-size:140%;margin-bottom:15px}. DVDs with two Textiled tbody elements
|:\3. 100 |{background:#ddd}|250||50|300|
|^(header).
|_. Title |_. Starring |_. Director |_. Writer |_. Notes |
|~(footer).
|\5=. This is the tfoot, centred |
|-(toplist){background:#c5f7f6}.
| _The Usual Suspects_ | Benicio Del Toro, Gabriel Byrne, Stephen Baldwin, Kevin Spacey | Bryan Singer | Chris McQaurrie | One of the finest films ever made |
| _Se7en_ | Morgan Freeman, Brad Pitt, Kevin Spacey | David Fincher | Andrew Kevin Walker | Great psychological thriller |
| _Primer_ | David Sullivan, Shane Carruth | Shane Carruth | Shane Carruth | Amazing insight into trust and human psychology <br>rather than science fiction. Terrific! |
| _District 9_ | Sharlto Copley, Jason Cope | Neill Blomkamp | Neill Blomkamp, Terri Tatchell | Social commentary layered on thick,
but boy is it done well |
|-(medlist){background:#e7e895;}.
| _Arlington Road_ | Tim Robbins, Jeff Bridges | Mark Pellington | Ehren Kruger | Awesome study in neighbourly relations |
| _Phone Booth_ | Colin Farrell, Kiefer Sutherland, Forest Whitaker | Joel Schumacher | Larry Cohen | Edge-of-the-seat stuff in this
short but brilliantly executed thriller |
expect: |
<table id="dvds" style="border-collapse:collapse;" summary="Great films on DVD employing Textile summary, caption, thead, tfoot, two tbody elements and colgroups">
<caption style="font-size:140%; margin-bottom:15px;"><span class="caps">DVD</span>s with two Textiled tbody elements</caption>
<colgroup span="3" width="100">
<col style="background:#ddd;" />
<col width="250" />
<col />
<col width="50" />
<col width="300" />
</colgroup>
<thead class="header">
<tr>
<th>Title </th>
<th>Starring </th>
<th>Director </th>
<th>Writer </th>
<th>Notes </th>
</tr>
</thead>
<tfoot class="footer">
<tr>
<td colspan="5" style="text-align:center;">This is the tfoot, centred </td>
</tr>
</tfoot>
<tbody class="toplist" style="background:#c5f7f6;">
<tr>
<td> <em>The Usual Suspects</em> </td>
<td> Benicio Del Toro, Gabriel Byrne, Stephen Baldwin, Kevin Spacey </td>
<td> Bryan Singer </td>
<td> Chris McQaurrie </td>
<td> One of the finest films ever made </td>
</tr>
<tr>
<td> <em>Se7en</em> </td>
<td> Morgan Freeman, Brad Pitt, Kevin Spacey </td>
<td> David Fincher </td>
<td> Andrew Kevin Walker </td>
<td> Great psychological thriller </td>
</tr>
<tr>
<td> <em>Primer</em> </td>
<td> David Sullivan, Shane Carruth </td>
<td> Shane Carruth </td>
<td> Shane Carruth </td>
<td> Amazing insight into trust and human psychology <br>
rather than science fiction. Terrific! </td>
</tr>
<tr>
<td> <em>District 9</em> </td>
<td> Sharlto Copley, Jason Cope </td>
<td> Neill Blomkamp </td>
<td> Neill Blomkamp, Terri Tatchell </td>
<td> Social commentary layered on thick,<br>
but boy is it done well </td>
</tr>
</tbody>
<tbody class="medlist" style="background:#e7e895;">
<tr>
<td> <em>Arlington Road</em> </td>
<td> Tim Robbins, Jeff Bridges </td>
<td> Mark Pellington </td>
<td> Ehren Kruger </td>
<td> Awesome study in neighbourly relations </td>
</tr>
<tr>
<td> <em>Phone Booth</em> </td>
<td> Colin Farrell, Kiefer Sutherland, Forest Whitaker </td>
<td> Joel Schumacher </td>
<td> Larry Cohen </td>
<td> Edge-of-the-seat stuff in this<br>
short but brilliantly executed thriller </td>
</tr>
</tbody>
</table>
Basic footref & footnote:
notes: |
Standard footrefs and footnotes from textile 2.0.
The textile tester removes the random ID from the text returned by textile in this test. This allows the rest of the output to be tested.
input: |
See[1] for details -- or perhaps[100] at a push.
fn1. Here are the details.
fn100(footy#otherid). A totally unrelated footnote.
expect : |
<p>See<sup class="footnote" id="fnrevxyz-1"><a href="#fnxyz-1">1</a></sup> for details — or perhaps<sup class="footnote" id="fnrevxyz-2"><a href="#fnxyz-2">100</a></sup> at a push.</p>
<p class="footnote" id="fnxyz-1"><sup>1</sup> Here are the details.</p>
<p class="footy" id="otherid"><sup id="fnxyz-2">100</sup> A totally unrelated footnote.</p>
Cross linked footref and footnote :
notes : |
Uses the '^' modifier on the footnote to turn on reverse linking to the *first* use of the corresponding reference
The textile tester removes the random ID from the text returned by textile in this test. This allows the rest of the output to be tested.
input : |
See[2] for details, and later, reference it again[2].
fn2^(footy#otherid)[en]. Here are the details.
expect : |
<p>See<sup class="footnote" id="fnrevxyz-1"><a href="#fnxyz-1">2</a></sup> for details, and later, reference it again<sup class="footnote"><a href="#fnxyz-1">2</a></sup>.</p>
<p class="footy" id="otherid" lang="en"><sup id="fnxyz-1"><a href="#fnrevxyz-1">2</a></sup> Here are the details.</p>
Unlinked footref and footnote :
notes : |
Uses the '!' modifier on the footref to turn off linking to the footnote
The textile tester removes the random ID from the text returned by textile in this test. This allows the rest of the output to be tested.
input : |
See[3!] for details.
fn3. Here are the details.
expect : |
<p>See<sup class="footnote" id="fnrevxyz-1">3</sup> for details.</p>
<p class="footnote" id="fnxyz-1"><sup>3</sup> Here are the details.</p>
Backlinked footref to footnote :
notes : |
Uses the '!' modifier on the footref to turn off linking to the footnote
Uses the '^' modifier on the footnote to turn on reverse linking to the *first* use of the corresponding reference
The textile tester removes the random ID from the text returned by textile in this test. This allows the rest of the output to be tested.
input : |
See[4!] for details.
fn4^. Here are the details.
expect : |
<p>See<sup class="footnote" id="fnrevxyz-1">4</sup> for details.</p>
<p class="footnote" id="fnxyz-1"><sup><a href="#fnrevxyz-1">4</a></sup> Here are the details.</p>
Simple Note Links:
input: |
Scientists say[#lavader] the moon is quite small. But I, for one, don't believe them. Others claim it to be made of cheese[#aardman]. If this proves true I suspect we are in for troubled times[#apollo13] as people argue over their "share" of the moon's cheese. In the end, its limited size[#lavader] may prove problematic.
note#lavader(noteclass). "Proof of the small moon hypothesis":http://antwrp.gsfc.nasa.gov/apod/ap080801.html. Copyright(c) Laurent Laveder
note#aardman(#noteid). "Proof of a cheese moon":http://www.imdb.com/title/tt0104361
note#apollo13. After all, things do go "wrong":http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident.
notelist{padding:1em;margin:1em;border-bottom:1px solid gray}.
notelist{padding:1em;margin:1em;border-bottom:1px solid gray}:§^.
notelist{padding:1em;margin:1em;border-bottom:1px solid gray}:‡.
notelist!.
expect: |
<p>Scientists say<sup><a href="#notexyz-2"><span id="noterefxyz-1">1</span></a></sup> the moon is quite small. But I, for one, don’t believe them. Others claim it to be made of cheese<sup><a href="#notexyz-4"><span id="noterefxyz-3">2</span></a></sup>. If this proves true I suspect we are in for troubled times<sup><a href="#notexyz-6"><span id="noterefxyz-5">3</span></a></sup> as people argue over their “share” of the moon’s cheese. In the end, its limited size<sup><a href="#note"><span id="noterefxyz-7">1</span></a></sup> may prove problematic.</p>
<ol style="padding:1em; margin:1em; border-bottom:1px solid gray;">
<li class="noteclass"><sup><a href="#noterefxyz-1">a</a></sup> <sup><a href="#noterefxyz-7">b</a></sup><span id="notexyz-2"> </span><a href="http://antwrp.gsfc.nasa.gov/apod/ap080801.html">Proof of the small moon hypothesis</a>. Copyright© Laurent Laveder</li>
<li id="noteid"><sup><a href="#noterefxyz-3">a</a></sup><span id="notexyz-4"> </span><a href="http://www.imdb.com/title/tt0104361">Proof of a cheese moon</a></li>
<li><sup><a href="#noterefxyz-5">a</a></sup><span id="notexyz-6"> </span>After all, things do go <a href="http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident">wrong</a>.</li>
</ol>
<ol style="padding:1em; margin:1em; border-bottom:1px solid gray;">
<li class="noteclass"><sup><a href="#noterefxyz-1">§</a></sup><span id="notexyz-2"> </span><a href="http://antwrp.gsfc.nasa.gov/apod/ap080801.html">Proof of the small moon hypothesis</a>. Copyright© Laurent Laveder</li>
<li id="noteid"><sup><a href="#noterefxyz-3">§</a></sup><span id="notexyz-4"> </span><a href="http://www.imdb.com/title/tt0104361">Proof of a cheese moon</a></li>
<li><sup><a href="#noterefxyz-5">§</a></sup><span id="notexyz-6"> </span>After all, things do go <a href="http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident">wrong</a>.</li>
</ol>
<ol style="padding:1em; margin:1em; border-bottom:1px solid gray;">
<li class="noteclass"><sup><a href="#noterefxyz-1">‡</a></sup> <sup><a href="#noterefxyz-7">‡</a></sup><span id="notexyz-2"> </span><a href="http://antwrp.gsfc.nasa.gov/apod/ap080801.html">Proof of the small moon hypothesis</a>. Copyright© Laurent Laveder</li>
<li id="noteid"><sup><a href="#noterefxyz-3">‡</a></sup><span id="notexyz-4"> </span><a href="http://www.imdb.com/title/tt0104361">Proof of a cheese moon</a></li>
<li><sup><a href="#noterefxyz-5">‡</a></sup><span id="notexyz-6"> </span>After all, things do go <a href="http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident">wrong</a>.</li>
</ol>
<ol>
<li class="noteclass"><span id="notexyz-2"> </span><a href="http://antwrp.gsfc.nasa.gov/apod/ap080801.html">Proof of the small moon hypothesis</a>. Copyright© Laurent Laveder</li>
<li id="noteid"><span id="notexyz-4"> </span><a href="http://www.imdb.com/title/tt0104361">Proof of a cheese moon</a></li>
<li><span id="notexyz-6"> </span>After all, things do go <a href="http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident">wrong</a>.</li>
</ol>
Links from already encoded URL:
input: |
French "Cheeses":https://en.wikipedia.org/wiki/Appellation_d%27Origine_Contr%C3%B4l%C3%A9e
expect: |
<p>French <a href="https://en.wikipedia.org/wiki/Appellation_d%27Origine_Contr%C3%B4l%C3%A9e">Cheeses</a></p>
Note Links.:
input: |
Scientists say[#lavader] the moon is quite small. But I, for one, don't believe them. Others claim it to be made of cheese[#aardman]. If this proves true I suspect we are in for troubled times[#apollo13] as people argue over their "share" of the moon's cheese. In the end, its limited size[#lavader] may prove problematic.
note#lavader. "Proof of the small moon hypothesis":http://antwrp.gsfc.nasa.gov/apod/ap080801.html. Copyright(c) Laurent Laveder
note#aardman. "Proof of a cheese moon":http://www.imdb.com/title/tt0104361
note#apollo13. After all, things do go "wrong":http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident.
h2. Here are my references.
notelist{padding:1em;margin:1em;border-bottom:1px solid gray}.
expect: |
<p>Scientists say<sup><a href="#notexyz-2"><span id="noterefxyz-1">1</span></a></sup> the moon is quite small. But I, for one, don’t believe them. Others claim it to be made of cheese<sup><a href="#notexyz-4"><span id="noterefxyz-3">2</span></a></sup>. If this proves true I suspect we are in for troubled times<sup><a href="#notexyz-6"><span id="noterefxyz-5">3</span></a></sup> as people argue over their “share” of the moon’s cheese. In the end, its limited size<sup><a href="#note"><span id="noterefxyz-7">1</span></a></sup> may prove problematic.</p>
<h2>Here are my references.</h2>
<ol style="padding:1em; margin:1em; border-bottom:1px solid gray;">
<li><sup><a href="#noterefxyz-1">a</a></sup> <sup><a href="#noterefxyz-7">b</a></sup><span id="notexyz-2"> </span><a href="http://antwrp.gsfc.nasa.gov/apod/ap080801.html">Proof of the small moon hypothesis</a>. Copyright© Laurent Laveder</li>
<li><sup><a href="#noterefxyz-3">a</a></sup><span id="notexyz-4"> </span><a href="http://www.imdb.com/title/tt0104361">Proof of a cheese moon</a></li>
<li><sup><a href="#noterefxyz-5">a</a></sup><span id="notexyz-6"> </span>After all, things do go <a href="http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident">wrong</a>.</li>
</ol>
Unlinked Note References with backlinked and unreferenced defs.:
input: |
Scientists say[#lavader!] the moon is quite small. But I, for one, don't believe them. Others claim it to be made of cheese[#aardman!]. If this proves true I suspect we are in for troubled times[#apollo13!] as people argue over their "share" of the moon's cheese. In the end, its limited size[#lavader!] may prove problematic.
note#unused. An unreferenced note.
note#lavader^. "Proof of the small moon hypothesis":http://antwrp.gsfc.nasa.gov/apod/ap080801.html. Copyright(c) Laurent Laveder
note#aardman^. "Proof of a cheese moon":http://www.imdb.com/title/tt0104361
note#apollo13^. After all, things do go "wrong":http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident.
notelist{padding:1em;margin:1em;border-bottom:1px solid gray}:α!+.
expect: |
<p>Scientists say<sup><span id="noterefxyz-1">1</span></sup> the moon is quite small. But I, for one, don’t believe them. Others claim it to be made of cheese<sup><span id="noterefxyz-3">2</span></sup>. If this proves true I suspect we are in for troubled times<sup><span id="noterefxyz-5">3</span></sup> as people argue over their “share” of the moon’s cheese. In the end, its limited size<sup><span id="noterefxyz-7">1</span></sup> may prove problematic.</p>
<ol style="padding:1em; margin:1em; border-bottom:1px solid gray;">
<li><sup><a href="#noterefxyz-1">α</a></sup><span id="notexyz-2"> </span><a href="http://antwrp.gsfc.nasa.gov/apod/ap080801.html">Proof of the small moon hypothesis</a>. Copyright© Laurent Laveder</li>
<li><sup><a href="#noterefxyz-3">α</a></sup><span id="notexyz-4"> </span><a href="http://www.imdb.com/title/tt0104361">Proof of a cheese moon</a></li>
<li><sup><a href="#noterefxyz-5">α</a></sup><span id="notexyz-6"> </span>After all, things do go <a href="http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident">wrong</a>.</li>
<li>An unreferenced note.</li>
</ol>
Malformed notelist :
input: |
Scientists say[#lavader] the moon is quite small. But I, for one, don't believe them. Others claim it to be made of cheese[#aardman]. If this proves true I suspect we are in for troubled times[#apollo13!] as people argue over their "share" of the moon's cheese. In the end, its limited size[#lavader] may prove problematic.
note#unused An unreferenced note.
note#lavader^ "Proof of the small moon hypothesis":http://antwrp.gsfc.nasa.gov/apod/ap080801.html. Copyright(c) Laurent Laveder
note#aardman^ "Proof of a cheese moon":http://www.imdb.com/title/tt0104361
note#apollo13^ After all, things do go "wrong":http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident.
notelist{padding:1em;margin:1em;border-bottom:1px solid gray}:α!+
expect: |
<p>Scientists say<sup><a href="#notexyz-2"><span id="noterefxyz-1">1</span></a></sup> the moon is quite small. But I, for one, don’t believe them. Others claim it to be made of cheese<sup><a href="#notexyz-4"><span id="noterefxyz-3">2</span></a></sup>. If this proves true I suspect we are in for troubled times<sup><span id="noterefxyz-5">3</span></sup> as people argue over their “share” of the moon’s cheese. In the end, its limited size<sup><a href="#note"><span id="noterefxyz-7">1</span></a></sup> may prove problematic.</p>
<ol style="padding:1em; margin:1em; border-bottom:1px solid gray;">
<li><sup><a href="#noterefxyz-1">α</a></sup><span id="notexyz-2"> </span><a href="http://antwrp.gsfc.nasa.gov/apod/ap080801.html">Proof of the small moon hypothesis</a>. Copyright© Laurent Laveder</li>
<li><sup><a href="#noterefxyz-3">α</a></sup><span id="notexyz-4"> </span><a href="http://www.imdb.com/title/tt0104361">Proof of a cheese moon</a></li>
<li><sup><a href="#noterefxyz-5">α</a></sup><span id="notexyz-6"> </span>After all, things do go <a href="http://en.wikipedia.org/wiki/Apollo_13#The_oxygen_tank_incident">wrong</a>.</li>
<li>An unreferenced note.</li>
</ol>
Empty notelist :
input : |
There should be nothing below.
notelist.
expect : |
<p>There should be nothing below.</p>
Undefined note :
input : |
Paragraph with a note[#note] and more, but no definition.
notelist.
expect : |
<p>Paragraph with a note<sup><a href="#notexyz-2"><span id="noterefxyz-1">1</span></a></sup> and more, but no definition.</p>
<ol>
<li><sup><a href="#noterefxyz-1">a</a></sup> Undefined Note [#note].</li>
</ol>
Issue 72 - spans around foreign chars :
input : |
*W skład zestawu wchodzą*:
*W skład zestawu wchodzą*:\x20
expect : |
<p><strong>W skład zestawu wchodzą</strong>:</p>
<p><strong>W skład zestawu wchodzą</strong>: </p>
Textile comments :
input : |
###. Here's a comment.
h3. Hello
###. And
another
one.
Goodbye.
expect : |
<h3>Hello</h3>
<p>Goodbye.</p>
Smileys still smileys? :
setup:
setHtmlType: xhtml
notes : Make sure smileys don't get recognised as a definition list.
input : |
:(
:)
:(\x20
:(\x20
:(\x20
:)\x20
Pinocchio!
:^)
Baboon!
:=)
Wink!
;)
:[\x20
:]
;(
something
dark side
:)\x20
;(c)[de] Item
expect : |
<p>:(</p>
<p>:)</p>
<p>:( <br />
:( <br />
:( <br />
:) </p>
<p>Pinocchio!<br />
:^)</p>
<p>Baboon!<br />
:=)</p>
<p>Wink!<br />
;)</p>
<p>:[ <br />
:]</p>
<p>;(<br />
something<br />
dark side<br />
:) </p>
<dl class="c" lang="de">
<dt>Item</dt>
</dl>
Styles on phrase modifiers :
input: |
~{text-align:right;}My text~
%{text-align:right;}My text%
^{text-align:right;}My text^
??{text-align:right;}My text??
*{text-align:right;}My text*
**{text-align:right;}My text**
-{text-align:right;}My text-
+{text-align:right;}My text+
_{text-align:right;}My text_
__{text-align:right;}My text__
@{text-align:right;}My text@
_{content:大阪府;}Unicode style_
expect: |
<p><sub style="text-align:right;">My text</sub></p>
<p><span style="text-align:right;">My text</span></p>
<p><sup style="text-align:right;">My text</sup></p>
<p><cite style="text-align:right;">My text</cite></p>
<p><strong style="text-align:right;">My text</strong></p>
<p><b style="text-align:right;">My text</b></p>
<p><del style="text-align:right;">My text</del></p>
<p><ins style="text-align:right;">My text</ins></p>
<p><em style="text-align:right;">My text</em></p>
<p><i style="text-align:right;">My text</i></p>
<p><code>{text-align:right;}My text</code></p>
<p><em style="content:大阪府;">Unicode style</em></p>
Classes/ids/langs on phrase modifiers :
input: |
~(c#id)[en]My text~
%(c#id)[En]My text%
^(c#id)[EN]My text^
??(c#id)[en-gb]My text??
*(c#id)[en-GB]My text*
**(c#id)[en-Gb]My text**
-(c#id)[ENG]My text-
+(c#id)[eng]My text+
_(c#id)[kjwwef89]My text_
__(c#id)[12]My text__
@(c#id)[Whatever]My text@
expect: |
<p><sub class="c" id="id" lang="en">My text</sub></p>
<p><span class="c" id="id" lang="En">My text</span></p>
<p><sup class="c" id="id" lang="EN">My text</sup></p>
<p><cite class="c" id="id" lang="en-gb">My text</cite></p>
<p><strong class="c" id="id" lang="en-GB">My text</strong></p>
<p><b class="c" id="id" lang="en-Gb">My text</b></p>
<p><del class="c" id="id" lang="ENG">My text</del></p>
<p><ins class="c" id="id" lang="eng">My text</ins></p>
<p><em class="c" id="id" lang="kjwwef89">My text</em></p>
<p><i class="c" id="id" lang="12">My text</i></p>
<p><code>(c#id)[Whatever]My text</code></p>
Classes/ids/langs on phrase modifiers (restricted) :
setup:
setRestricted: true
setLite: true
setImages: false
setLinkRelationShip: nofollow
input: |
~(c#id)[en]My text~
%(c#id)[En]My text%
^(c#id)[EN]My text^
??(c#id)[en-gb]My text??
*(c#id)[en-GB]My text*
**(c#id)[en-Gb]My text**
-(c#id)[ENG]My text-
+(c#id)[eng]My text+
_(c#id)[kjwwef89]My text_
__(c#id)[12]My text__
@(c#id)[Whatever]My text@
expect: |
<p><sub lang="en">My text</sub></p>
<p><span lang="En">My text</span></p>
<p><sup lang="EN">My text</sup></p>
<p><cite lang="en-gb">My text</cite></p>
<p><strong lang="en-GB">My text</strong></p>
<p><b lang="en-Gb">My text</b></p>
<p><del lang="ENG">My text</del></p>
<p><ins lang="eng">My text</ins></p>
<p><em lang="kjwwef89">My text</em></p>
<p><i lang="12">My text</i></p>
<p>@(c#id)[Whatever]My text@</p>
Github Issue 50 (en-dash & strike) :
setup:
setHtmlType: xhtml
input: |
fjfhfjhf
fhfhfh
xyz
- fjfhfjhf
- fhfhfh
- xyz
a -b-
a -b-\x20
a - b
a -b
a- b
a-b
-b
a-
b
a -
b
a -\x20
b
expect: |
<p>fjfhfjhf<br />
fhfhfh<br />
xyz</p>
<p>- fjfhfjhf<br />
- fhfhfh<br />
- xyz</p>
<p>a <del>b</del><br />
a <del>b</del> <br />
a – b<br />
a -b<br />
a- b<br />
a-b<br />
-b<br />
a-<br />
b<br />
a -<br />
b<br />
a – <br />
b</p>
Tight tables... :
input: |
Tables containing other textile elements.
|.244 x -.123 = ?|
|@Don't _touch_ this!@| @Don't _touch_ this!@ |
|==Don't _touch_ this!==| ==Don't _touch_ this!== |
|You _can_ touch this!| You _can_ touch this! |
|_touch_ this!| _touch_ this! |
|^superscripted^| ^superscripted^ |
|~subscripted~| ~subscripted~ |
|*strong*| *strong* |
|!http://tester.local/logo.png!| !http://tester.local/logo.png! |
|"$":https://github.com/netcarver/textile| "$":https://github.com/netcarver/textile |
| This | is | a | row | * with a list
* inside it |
|This|is|a|row|* with a list
* inside it|
expect: |
<p>Tables containing other textile elements.</p>
<table>
<tr>
<td>.244 × -.123 = ?</td>
</tr>
</table>
<table>
<tr>
<td><code>Don't _touch_ this!</code></td>
<td> <code>Don't _touch_ this!</code> </td>
</tr>
<tr>
<td>Don't _touch_ this!</td>
<td> Don't _touch_ this! </td>
</tr>
<tr>
<td>You <em>can</em> touch this!</td>
<td> You <em>can</em> touch this! </td>
</tr>
<tr>
<td><em>touch</em> this!</td>
<td> <em>touch</em> this! </td>
</tr>
<tr>
<td><sup>superscripted</sup></td>
<td> <sup>superscripted</sup> </td>
</tr>
<tr>
<td><sub>subscripted</sub></td>
<td> <sub>subscripted</sub> </td>
</tr>
<tr>
<td><strong>strong</strong></td>
<td> <strong>strong</strong> </td>
</tr>
<tr>
<td><img alt="" src="http://tester.local/logo.png" /></td>
<td> <img alt="" src="http://tester.local/logo.png" /> </td>
</tr>
<tr>
<td><a href="https://github.com/netcarver/textile">github.com/netcarver/textile</a></td>
<td> <a href="https://github.com/netcarver/textile">github.com/netcarver/textile</a> </td>
</tr>
</table>
<table>
<tr>
<td> This </td>
<td> is </td>
<td> a </td>
<td> row </td>
<td> <ul>
<li>with a list</li>
<li>inside it</li>
</ul></td>
</tr>
<tr>
<td>This</td>
<td>is</td>
<td>a</td>
<td>row</td>
<td><ul>
<li>with a list</li>
<li>inside it</li>
</ul></td>
</tr>
</table>
Empty things... :
input: |
''
""
%%
^^
&&
**
__
--
++
~~
{}
[]
()
<>
\\
//
??
==
@@
##
$$
!!
::
;;
..
,,
||
` `
' '
" "
% %
^ ^
& &
* *
_ _
- -
+ +
~ ~
{ }
[ ]
( )
< >
\ \
/ /
? ?
= =
@ @
# #
$ $
! !
: :
; ;
. .
, ,
expect: |
<p>‘’</p>
<p>“”</p>
<p>%%</p>
<p>^^</p>
<p>&&</p>
<p>**</p>
<p>__</p>
<p>—</p>
<p>++</p>
<p>~~</p>
<p>{}</p>
<p>[]</p>
<p>()</p>
<p><></p>
<p>\\</p>
<p>//</p>
<p>??</p>
<p>==</p>
<p><code></code></p>
<p>##</p>
<p>$$</p>
<p>!!</p>
<p>::</p>
<p>;;</p>
<p>..</p>
<p>,,</p>
<table>
<tr>
<td></td>
</tr>
</table>
<p>` `</p>
<p>‘ ‘</p>
<p>“ “</p>
<p>% %</p>
<p>^ ^</p>
<p>& &</p>
<ul>
<li>*</li>
</ul>
<p>_ _</p>
<p>- -</p>
<p>+ +</p>
<p>~ ~</p>
<p>{ }</p>
<p>[ ]</p>
<p>( )</p>
<p>< ></p>
<p>\ \</p>
<p>/ /</p>
<p>? ?</p>
<p>= =</p>
<p><code> </code></p>
<ol>
<li>#</li>
</ol>
<p>$ $</p>
<p>! !</p>
<dl>
<dd>:</dd>
</dl>
<dl>
<dt>;</dt>
</dl>
<p>. .</p>
<p>, ,</p>
Restricted mode security filtering mode with default options :
setup:
setRestricted: true
setLite: true
setImages: false
setLinkRelationShip: nofollow
input : |
!10x10.gif!
"bad protocol":file://local/file
"javascript link":javacript:window.alert()
"nofollow":http://example.com
notextile. <iframe src="xss/attempt"></iframe><{><script>window.alert('success')</script>
!http://example.com/<script>window.alert("Hello World!");</script>.png!
"test":link1
[link1]http://example.com/<script>window.alert("HelloWorld!");</script>
<!-- <a href="#">HTTML comment</a> -->
expect : |
<p>!10×10.gif!</p>
<p>“bad protocol”:file://local/file</p>
<p>“javascript link”:javacript:window.alert()</p>
<p><a href="http://example.com/" rel="nofollow">nofollow</a></p>
<p>notextile. <iframe src=“xss/attempt”></iframe><&#123><script>window.alert(‘success’)</script></p>
<p>!http://example.com/<script>window.alert(“Hello World!”);</script>.png!</p>
<p><a href="http://example.com/%3Cscript%3Ewindow.alert(%22HelloWorld!%22);%3C/script%3E" rel="nofollow">test</a></p>
<p><!— <a href=”#”><span class="caps">HTTML</span> comment</a> —></p>
Token references :
input : |
Hello textileopentag0000000001z World!
Try looking up textileRef:0000:84712874324.
expect : |
<p>Hello textileopentag0000000001z World!</p>
<p>Try looking up textileRef:0000:84712874324.</p>
Link and image encoding :
input : |
!http://example.com/?size=60&file=image.png!
!http://example.com/needs<&"encoding.png!
"Requires encoding":http://example.com/?foo&bar
"Entity is merely part of text":http://example.com/?foo&bar
"In path component":http://example.com/&.html
expect : |
<p><img alt="" src="http://example.com/?size=60&file=image.png" /></p>
<p><img alt="" src="http://example.com/needs%3C&%22encoding.png" /></p>
<p><a href="http://example.com/?foo&bar">Requires encoding</a></p>
<p><a href="http://example.com/?foo&amp;bar">Entity is merely part of text</a></p>
<p><a href="http://example.com/&.html">In path component</a></p>