开发者

text to html script

Does anyone have or know of a Ruby script that converts text to html?

Example:

I have a file 开发者_开发问答that contains the following text:

Host Name

Info1
Line1
Info2
Line2

I want to have ruby convert it to the following html output

Host Name

Info1

Line1

Info2

Line2

I tried running RedCloth but got the following error:

The program can't start because msvcrt-ruby18.dll is missing

Thanks

Thanks


That depends upon what you mean by "text to HTML." There are several "web text generators" that convert easy-to-read free text with minimal markup (asterisks to indicate bold, double-spaced paragraphs get surrounded in <p> tags, etc). The most common, for Ruby, are Redcloth, which implements Textile free text, and Bluecloth, which implements Markdown.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜