There seems to be a limitation in Text::Textile with parsing
of urls.
For example if I set up a url in the format that T::T
expects, eg: "some
link text":http://my.url
Everything works as expected, but if I use the sort of link
that we have
in our online manuals, eg:
"section 5(1)(a)": ../1/index.html#s5ra
It produces the link <a
href="../1/index.html#s5r1"
title="a">Section
5(1)</a>
This is a feature, since parentheses are supposed to enclose
title
attributes for links.
But you can turn off textile processing with ==
When I do this, as in "sections ==5(1)==":
../1/index.html#s5ra
I get "sections
5(1)(a)":www.gov.mb.ca/1/index.html#s5ra as source
code
output.
Textism produces source code:
<a
href="www.gov.mb.ca/1/index.html#s5ra">sections
5(1)</a>
What I've done, is pre-process the text to replace all
parentheses with
a string that won't ever show up in the content (...he
asserted
optimistically...) and then post-process the string to
restore
parentheses. Which has the advantage that users don't have
to worry
about escaping parentheses, and the disadvantage that they
can't add a
title attribute to a link.
|