I have come across certain situations where text marked up with textile
syntax needs to be displayed where HTML isn’t wanted. For example, in
the title element of a an HTML page.
In these situations, I would like a way of stripping away the textile
markup from a string and displaying it completely “naked” - without HTML
tags and, crucially, without the textile markup too.
The quick brown “fox”:/fox.html jumps over the lazy dog’s tail.
The quick brown fox jumps over the lazy dogâ€™s tail.
(N.B. In the example above, I still want my punctuation made pretty
“dog’s tail” should still become “dogâ€™s tail” )
What’s the best way of doing this? If there isn’t an elegant way of
doing it, could Redcloth have a to_plaintext method?