将“纺织品加价"转换为“降价"? [英] Convert Textile Markup to Markdown?

查看:88
本文介绍了将“纺织品加价"转换为“降价"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在合并旧版系统,某些组件使用Markdown,而其他组件使用Textile格式.这让我的用户非常困惑.因此,我想在Markdown上实现标准化.

I'm merging legacy Systems and some components use Markdown and others use Textile formatting. This is extremely confusing to my users. Therefore I want to standardize on Markdown.

是否有一种方法可以将至少大部分纺织品格式自动转换为降价商品?

Is there a way to convert at least the Bulk of Textile formatting to markdown automatically?

推荐答案

由于Markdown和Textile都是要产生HTML的,因此请考虑先将所有Texile转换为HTML. 有许多Markdown实现,它们也支持将HTML转换回Markdown. Pandoc 是一个示例.另一种可能的解决方案是使用 XSLT .

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.

由于Textile比Markdown更为冗长,因此某些元素(如表格)将保持标记为HTML,这在Markdown中非常合适,但也可能会使您的用户感到困惑.

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.

这篇关于将“纺织品加价"转换为“降价"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆