From: Phlip Date: 2005-03-27T02:14:52+09:00 Subject: convert YAML to HTML? 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 , .) I need output with cute
tags around the arrays. To use Ruby's magical extensiveness on Jamis Buck's Syntax::Convertors::HTML class, I would also need the lexer to parse [] and , properly. I might just spark up a TDD session and see how far I get with app-specific code... > -- > Phlip > http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces