---
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 & 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&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&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&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&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&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>“link text(link title) “: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&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&cd=//&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>“testing”:</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 “very unlikely” 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 “very unlikely” the “economic stimulus” 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">“Open the pod bay doors please, <span class="caps">HAL</span>.”</a></p>'
---
name: link following quoted phrase
in: '"quote" text "quote" text "link":http://google.com'
html: '<p>“quote” text “quote” 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 “text” followed by a <a href="http://redcloth.org">link</a>.</p>'
lite_mode_html: 'Some “text” 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>“I first learned about <a href="http://redcloth.org/">Redcloth</a> several years ago.</p>
<p>“It’s wonderful.”</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>“Here is a <a href="http://redcloth.org/">link</a>.</p>
<p>“I like links.”</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>“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>,” said Gore in an email. “I am deeply honored to receive the Nobel Peace Prize.”</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>