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. ).
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)

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. ).
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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs