Convert Textile Markup to Markdown?

浪子不回头ぞ 提交于 2019-12-02 23:24:42
Jonas

Because Markdown and Textile are both meant to produce HTML, consider converting all Texile to HTML first. There are a number of Markdown implementations which also support converting HTML back to Markdown. Pandoc being one example. Another possible solution would be using XSLT.

Because Textile is more verbose than Markdown, some elements (like tables) will stay marked up as HTML, which is perfectly fine with Markdown but may also be a source of confusion for your users.

The forthcoming pandoc 1.8 (or the current github version) can convert Textile to Markdown directly. I don't know how much of Textile it handles, but

pandoc index.textile -o index.markdown

worked nicely here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!