Conversion of special characters to entities
Jelks Cabaniss
jelks at jelks.nu
Wed Mar 9 16:23:54 EST 2005
Lasar Liepins wrote:
> Apparently MarkDown does not convert special characters that possess
> HTML entity equivalents. Examples are German Umlauts (ä becomes ä
> etc), which often come up in my documents, with me being German and
> all that. Of course I can do this with an additional script after or
> before running MarkDown over my documents, but since for example the
> ampersand is converted to &, I was wondering why such characters
> are not replaced by their respective entities.
You can use HTML [Tidy] for this. Note that the default for Tidy is for
entire documents, though, not snippets. Use the `show-body-only: yes`
option for snippets.
Piping your Markdown output to Tidy has the additional benefit of being able
to format ("pretty print") your HTML in many different ways.
/Jelks
(with subliminal suggestion for implicit link alias incorporated:)
[Tidy]: http://tidy.sf.net
More information about the Markdown-Discuss
mailing list