2010-02-22 72 views
6

我正在使用wikipedia API獲取wikipedia的信息。 有沒有什麼可以在html中轉換wiki文本?從wiki到html的轉換

我已經試過mediacloth但我不工作得很好

回答

1

看看marker

>> 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>