从wiki转换为html

Luc*_*oli 7 ruby-on-rails wikipedia-api

我正在使用维基百科api从维基百科获取信息.在html中有什么转换维基文本吗?

我尝试过mediacloth但是我的效果不好

小智 1

看看标记

>> require 'marker'
>> m = Marker.parse "== heading ==\nparagraph with '''bold''' text"
>> puts m.to_html
<h2>heading</h2>
<p>paragraph with <b>bold</b> text</p>
Run Code Online (Sandbox Code Playgroud)