---
in: '"link text":#1'
html: <p><a href="#1">link text</a></p>
---
in: '"link text":#a'
html: <p><a href="#a">link text</a></p>
---
in: '"link text":#a1'
html: <p><a href="#a1">link text</a></p>
---
in: '"link text":#a10'
html: <p><a href="#a10">link text</a></p>
---
in: '"link text":index.html'
html: <p><a href="index.html">link text</a></p>
---
in: '"link text":index.html#1'
html: <p><a href="index.html#1">link text</a></p>
---
in: '"link text":index.html#a'
html: <p><a href="index.html#a">link text</a></p>
---
in: '"link text":index.html#a1'
html: <p><a href="index.html#a1">link text</a></p>
---
in: '"link text":index.html#a10'
html: <p><a href="index.html#a10">link text</a></p>
---
in: '"link text":http://example.com/'
html: <p><a href="http://example.com/">link text</a></p>
---
in: '"link text":http://example.com/#1'
html: <p><a href="http://example.com/#1">link text</a></p>
---
in: '"link text":http://example.com/#a'
html: <p><a href="http://example.com/#a">link text</a></p>
---
in: '"link text":http://example.com/#a1'
html: <p><a href="http://example.com/#a1">link text</a></p>
---
in: '"link text":http://example.com/#a10'
html: <p><a href="http://example.com/#a10">link text</a></p>
---
in: '"link text":http://example.com/index.html'
html: <p><a href="http://example.com/index.html">link text</a></p>
---
in: '"link text":http://example.com/index.html#a'
html: <p><a href="http://example.com/index.html#a">link text</a></p>
---
in: '"link text":http://example.com/index.html#1'
html: <p><a href="http://example.com/index.html#1">link text</a></p>
---
in: '"link text":http://example.com/index.html#a1'
html: <p><a href="http://example.com/index.html#a1">link text</a></p>
---
in: '"link text":http://example.com/index.html#a10'
html: <p><a href="http://example.com/index.html#a10">link text</a></p>
---
in: '"link text":http://example.com/?foo=bar'
html: <p><a href="http://example.com/?foo=bar">link text</a></p>
---
in: '"link text":http://example.com/?foo=bar#a'
html: <p><a href="http://example.com/?foo=bar#a">link text</a></p>
---
in: '"link & text":http://example.com/?foo=bar#a'
html: <p><a href="http://example.com/?foo=bar#a">link &amp; text</a></p>
---
in: '"link text":http://example.com/?foo=bar#1'
html: <p><a href="http://example.com/?foo=bar#1">link text</a></p>
---
in: '"link text":http://example.com/?foo=bar#a1'
html: <p><a href="http://example.com/?foo=bar#a1">link text</a></p>
---
in: '"link text":http://example.com/?foo=bar#a10'
html: <p><a href="http://example.com/?foo=bar#a10">link text</a></p>
---
in: '"link text":http://example.com/?foo=bar&a=b'
html: <p><a href="http://example.com/?foo=bar&amp;a=b">link text</a></p>
---
in: '"link text":http://example.com/?foo=bar&a=b#1'
html: <p><a href="http://example.com/?foo=bar&amp;a=b#1">link text</a></p>
---
in: '"link text":http://example.com/?foo=bar&a=b#a'
html: <p><a href="http://example.com/?foo=bar&amp;a=b#a">link text</a></p>
---
in: '"link text":http://example.com/?foo=bar&a=b#a1'
html: <p><a href="http://example.com/?foo=bar&amp;a=b#a1">link text</a></p>
---
in: '"link text":http://example.com/?foo=bar&a=b#a10'
html: <p><a href="http://example.com/?foo=bar&amp;a=b#a10">link text</a></p>
---
in: 'This is a "link":http://example.com/'
html: <p>This is a <a href="http://example.com/">link</a></p>
---
in: 'This is a "link":http://example.com/.'
html: <p>This is a <a href="http://example.com/">link</a>.</p>
---
in: 'This is a "link":http://example.com/index.html.'
html: <p>This is a <a href="http://example.com/index.html">link</a>.</p>
---
in: 'This is a "link":http://example.com/index.html#a.'
html: <p>This is a <a href="http://example.com/index.html#a">link</a>.</p>
---
in: 'This is a "link":http://example.com/index.html#1.'
html: <p>This is a <a href="http://example.com/index.html#1">link</a>.</p>
---
in: 'This is a "link":http://example.com/index.html#a1.'
html: <p>This is a <a href="http://example.com/index.html#a1">link</a>.</p>
---
in: 'This is a "link":http://example.com/index.html#a10.'
html: <p>This is a <a href="http://example.com/index.html#a10">link</a>.</p>
---
in: 'This is a "link":http://example.com/?foo=bar.'
html: <p>This is a <a href="http://example.com/?foo=bar">link</a>.</p>
---
in: 'This is a "link":http://example.com/?foo=bar#1.'
html: <p>This is a <a href="http://example.com/?foo=bar#1">link</a>.</p>
---
in: 'This is a "link":http://example.com/?foo=bar#a.'
html: <p>This is a <a href="http://example.com/?foo=bar#a">link</a>.</p>
---
in: 'This is a "link":http://example.com/?foo=bar#a1.'
html: <p>This is a <a href="http://example.com/?foo=bar#a1">link</a>.</p>
---
in: 'This is a "link":http://example.com/?foo=bar#a10.'
html: <p>This is a <a href="http://example.com/?foo=bar#a10">link</a>.</p>
---
in: 'This is a "link":http://example.com/?foo=bar#a10, but this is not.'
html: <p>This is a <a href="http://example.com/?foo=bar#a10">link</a>, but this is not.</p>
---
in: '(This is a "link":http://example.com/?foo=bar#a10) but this is not.'
html: <p>(This is a <a href="http://example.com/?foo=bar#a10">link</a>) but this is not.</p>
---
in: '"link text(link title)":http://example.com/'
html: <p><a href="http://example.com/" title="link title">link text</a></p>
# ---
# in: '"link text(link title) ":http://example.com/'
# html: <p>&#8220;link text(link title) &#8220;:http://example.com/</p>
# comments: this is a real test and should pass
---
name: link with title attribute
in: '"(link) text(link title)":http://example.com/'
html: <p><a href="http://example.com/" class="link" title="link title">text</a></p>
comments: link text can not contain parentheses
---
name: link with space between link text and title attribute
in: '"text (link title)":http://example.com/'
html: <p><a href="http://example.com/" title="link title">text</a></p>
---
in: '"Dive Into XML":http://www.xml.com/pub/au/164'
html: <p><a href="http://www.xml.com/pub/au/164">Dive Into <span class="caps">XML</span></a></p>
---
in: '"Lab Exercises":../lab/exercises/exercises.html.'
html: <p><a href="../lab/exercises/exercises.html">Lab Exercises</a>.</p>
---
in: 'Go to "discuss":http://www.dreammoods.com/cgibin/cutecast/cutecast.pl?forum=1&thread=26627 to discuss.'
html: <p>Go to <a href="http://www.dreammoods.com/cgibin/cutecast/cutecast.pl?forum=1&amp;thread=26627">discuss</a> to discuss.</p>
---
in: '* "rubylang":http://www.ruby-lang.org/en/'
html: "<ul>\n\t<li><a href=\"http://www.ruby-lang.org/en/\">rubylang</a></li>\n</ul>"
---
in: 'The ION coding style document found at "IONCodingStyleGuide.doc":http://perforce:8081/@md=d&cd=//&c=82E@//depot/systest/system/main/pub/doc/IONCodingStyleGuide.doc?ac=22 codifies a couple of rules to ensure reasonably consistent code and documentation of libraries in ION. Test text'
html: <p>The <span class="caps">ION</span> coding style document found at <a href="http://perforce:8081/@md=d&amp;cd=//&amp;c=82E@//depot/systest/system/main/pub/doc/IONCodingStyleGuide.doc?ac=22">IONCodingStyleGuide.doc</a> codifies a couple of rules to ensure reasonably consistent code and documentation of libraries in <span class="caps">ION</span>. Test text</p>
---
in: '"testing":'
html: "<p>&#8220;testing&#8221;:</p>"
---
name: trailing space not absorbed by link
in: '"Link":/foo.html me'
html: "<p><a href=\"/foo.html\">Link</a> me</p>"
---
name: trailing comma stays outside link
in: '"Link":/foo.html, me'
html: "<p><a href=\"/foo.html\">Link</a>, me</p>"
---
name: trailing exclamation stays outside link
in: '"Link":/foo.html! me'
html: "<p><a href=\"/foo.html\">Link</a>! me</p>"
---
name: trailing semicolon stays outside link
in: '"Link":/foo.html; me'
html: "<p><a href=\"/foo.html\">Link</a>; me</p>"
---
name: trailing period stays outside link
in: '"Link":/foo.html.'
html: "<p><a href=\"/foo.html\">Link</a>.</p>"
---
name: whose text is a parenthetical statement
in: '"(just in case you were wondering)":http://slashdot.org/'
html: '<p><a href="http://slashdot.org/">(just in case you were wondering)</a></p>'
---
name: that has a class and whose text is a parenthetical statement
in: '"(myclass) (just in case you were wondering)":http://slashdot.org/'
html: '<p><a href="http://slashdot.org/" class="myclass">(just in case you were wondering)</a></p>'
---
name: link containing parentheses
in: '"It is (very) fortunate that this works":http://slashdot.org/'
html: '<p><a href="http://slashdot.org/">It is (very) fortunate that this works</a></p>'
---
name: link containing quotes
in: '"He said it is "very unlikely" this works":http://slashdot.org/'
html: '<p><a href="http://slashdot.org/">He said it is &#8220;very unlikely&#8221; this works</a></p>'
---
name: link containing multiple quotes
in: '"He said it is "very unlikely" the "economic stimulus" works":http://slashdot.org/'
html: '<p><a href="http://slashdot.org/">He said it is &#8220;very unlikely&#8221; the &#8220;economic stimulus&#8221; works</a></p>'
---
name: linked quoted phrase
in: '""Open the pod bay doors please, HAL."":http://www.youtube.com/watch?v=npN9l2Bd06s'
html: '<p><a href="http://www.youtube.com/watch?v=npN9l2Bd06s">&#8220;Open the pod bay doors please, <span class="caps">HAL</span>.&#8221;</a></p>'
---
name: link following quoted phrase
in: '"quote" text "quote" text "link":http://google.com'
html: '<p>&#8220;quote&#8221; text &#8220;quote&#8221; text <a href="http://google.com">link</a></p>'
---
name: links containing underscores
in: 'This is a link to a "Wikipedia article about Barack":http://en.wikipedia.org/wiki/Barack_Obama'
html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Barack_Obama">Wikipedia article about Barack</a></p>'
---
name: links containing parentheses
in: 'This is a link to a ["Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language)]'
html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a></p>'
---
name: links contained in parentheses
in: 'This is a regular link (but in parentheses: "Google":http://www.google.com)'
html: '<p>This is a regular link (but in parentheses: <a href="http://www.google.com">Google</a>)</p>'
---
name: links containing parentheses without brackets
in: 'This is a link to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language)'
html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a></p>'
---
name: links containing parentheses period at end without brackets
in: 'This is a link to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language).'
html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a>.</p>'
---
name: broken links containing parentheses without brackets
in: 'This is a link to a "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language'
html: '<p>This is a link to a <a href="http://en.wikipedia.org/wiki/Textile_(markup_language">Wikipedia article about Textile</a></p>'
---
name: links containing parentheses without brackets inside a parenthesis
in: 'Textile is awesome! (Check out the "Wikipedia article about Textile":http://en.wikipedia.org/wiki/Textile_(markup_language))'
html: '<p>Textile is awesome! (Check out the <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Wikipedia article about Textile</a>)</p>'
---
name: quotes and follow link
in: 'Some "text" followed by a "link":http://redcloth.org.'
html: '<p>Some &#8220;text&#8221; followed by a <a href="http://redcloth.org">link</a>.</p>'
lite_mode_html: 'Some &#8220;text&#8221; followed by a <a href="http://redcloth.org">link</a>.'
---
name: link alias containing dashes
in: |-
  "link":google-rocks
  
  [google-rocks]http://google.com
html: |-
  <p><a href="http://google.com">link</a></p>
---
name: contained in multi-paragraph quotes
in: |-
  "I first learned about "Redcloth":http://redcloth.org/ several years ago.

  "It's wonderful."
html: |-
  <p>&#8220;I first learned about <a href="http://redcloth.org/">Redcloth</a> several years ago.</p>
  <p>&#8220;It&#8217;s wonderful.&#8221;</p>
---
name: as html in notextile contained in multi-paragraph quotes
in: |-
  "Here is a <notextile><a href="http://redcloth.org/">link</a></notextile>.

  "I like links."
html: |-
  <p>&#8220;Here is a <a href="http://redcloth.org/">link</a>.</p>
  <p>&#8220;I like links.&#8221;</p>
---
name: contained in para with multiple quotes
in: |-
  "My wife, Tipper, and I will donate 100% of the proceeds of the award to the "Alliance For Climate Protection":http://www.looktothestars.org/charity/638-alliance-for-climate-protection," said Gore in an email. "I am deeply honored to receive the Nobel Peace Prize."
html: |-
  <p>&#8220;My wife, Tipper, and I will donate 100% of the proceeds of the award to the <a href="http://www.looktothestars.org/charity/638-alliance-for-climate-protection">Alliance For Climate Protection</a>,&#8221; said Gore in an email. &#8220;I am deeply honored to receive the Nobel Peace Prize.&#8221;</p>
---
name: with caps in the title
in: |-
  "British Skin Foundation (BSF)":http://www.britishskinfoundation.org.uk
html: |-
  <p><a href="http://www.britishskinfoundation.org.uk" title="BSF">British Skin Foundation</a></p>
---
name: containing HTML tags with quotes
in: |-
  "<r:attachment:image name="checkmark.gif" alt="Apply online" />*apply online*":/admissions/apply/
html: |-
  <p><a href="/admissions/apply/"><r:attachment:image name="checkmark.gif" alt="Apply online" /><strong>apply online</strong></a></p>