2010-02-22 8 views
6

J'utilise une API pour obtenir des infos de wikipedia. Y a-t-il quelque chose pour convertir du texte wiki en html?Convertir du wiki en html

J'ai essayé mediacloth mais je ne fonctionne pas bien

Répondre

1

Jetez un oeil à 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>