From: Dave Thomas Date: 2003-02-14T06:07:09+09:00 Subject: Re: Need simplemarkup example Jim Freeze wrote: > Hi > > Does someone have an example using simplemarkup to convert a text > file to an HTML file? Jim: How about this, which converts a file on stdin to HTML on stdout: require 'markup/simple_markup' require 'markup/simple_markup/to_html' markup = SM::SimpleMarkup.new html = SM::ToHtml.new puts markup.convert(ARGF.read, html) Of course the fun comes when you add your own special sequences to the parsers (for example to handle hyperlinking and other good stuff). There are examples of doing this in RDoc and RubLog. Cheers Dave