From ae7c13758d1750db5b5ec966129bfcfdd8dc053f Mon Sep 17 00:00:00 2001 From: Simon Rozet Date: Mon, 27 Jun 2011 20:36:37 +0200 Subject: [PATCH] upgrade to rdoc 3.6.1 --- lib/github/markup/rdoc.rb | 10 +++------- test/markups/README.rdoc.html | 23 +++++++++-------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/lib/github/markup/rdoc.rb b/lib/github/markup/rdoc.rb index cf2a1a7d..5788ad0d 100644 --- a/lib/github/markup/rdoc.rb +++ b/lib/github/markup/rdoc.rb @@ -1,5 +1,4 @@ -require 'rdoc/generators/html_generator' -require 'ostruct' +require "rdoc/markup/to_html" module GitHub module Markup @@ -9,11 +8,8 @@ def initialize(content) end def to_html - simple_markup = SM::SimpleMarkup.new - generator = Generators::HyperlinkHtml.new('', OpenStruct.new) - simple_markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK) - simple_markup.add_special(/(((\{.*?\})|\b\S+?)\[\S+?\.\S+?\])/, :TIDYLINK) - simple_markup.convert(@content, generator) + h = ::RDoc::Markup::ToHtml.new + h.convert(@content) end end end diff --git a/test/markups/README.rdoc.html b/test/markups/README.rdoc.html index be56e8f5..b53c3b70 100644 --- a/test/markups/README.rdoc.html +++ b/test/markups/README.rdoc.html @@ -1,16 +1,11 @@ - -

-This is an absolute link. So is this: github.com -

-

-This is a relative link. So is this: rawr.html -

+

This is a relative link. So is this: rawr.html