simple markup to html

H

Hans Mueller

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

Hans Mueller

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top