From: Jamis Buck Date: 2005-03-27T03:16:47+09:00 Subject: Re: convert YAML to HTML? On Mar 26, 2005, at 10:14 AM, Phlip wrote: > Phlip wrote: > >> This has to have been on the YAML thought leader's Do List. >> >> Is there a library, or a snippet, out there that converts YAML to > esthetic, >> meaningful XHTML? >> >> I don't want to load the document into Ruby variables then stream them > with >> RedCloth because I'd lose the comments. >> >> Can I load the comments, too, and stream everything? > > Here's JB's Syntax module: > > http://jamisbuck.org/jamis/blog.cgi/programming/ruby/ > Syntax%200.7_20050323235420.tx > > Here's a sample output: > > - [ formatWiki, this is ''em''phatic text, > this > is <em>em</em>phatic text ] > > That's not cute enough. It's essentially a syntax highlighter for > YAML. (And > as such, it missed the [] tags and lexically significant commas , .) Yes, it is not a complete YAML parser. A patch would be more than welcome, though. If you (or anyone else) improves an existing lexer or adds a new one, I would love to add your changes to the Syntax lib. - Jamis