Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Ruby Programming Language

simple markup to html


trying to convert simple markup to html, works fine with
the commands below but hyperlinks (e.g. http:// or mailto:)
in the markup aren't transferred to html (e.g. <a href="">).
Anything missing?

require 'rdoc/markup/simple_markup'
require 'rdoc/markup/simple_markup/to_html'
markup = SM::SimpleMarkup.new
formatter = SM::ToHtml.new
puts markup.convert(ARGF.read, formatter)

--
Posted via http://www.ruby-forum.com/.

> trying to convert simple markup to html, works fine with
> the commands below but hyperlinks (e.g. http:// or mailto:)
> in the markup aren't transferred to html (e.g. <a href="">).
> Anything missing?

> require 'rdoc/markup/simple_markup'
> require 'rdoc/markup/simple_markup/to_html'
> markup = SM::SimpleMarkup.new
> formatter = SM::ToHtml.new
> puts markup.convert(ARGF.read, formatter)

ok, I found the "class HyperlinkHtml < SM::ToHtml" in
"rdoc/generators/html_generator.rb" which makes the job
with some minor modifications.

HM

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc