7979#
8080# class WikiHtml < RDoc::Markup::ToHtml
8181# def handle_regexp_WIKIWORD(target)
82- # "<font color=red>" + target.text + "</font>"
82+ # "<font color=red>" + target + "</font>"
8383# end
8484# end
8585#
@@ -113,7 +113,7 @@ class RDoc::Markup
113113 ##
114114 # An AttributeManager which handles inline markup.
115115
116- attr_reader :attribute_manager
116+ attr_reader :regexp_handlings
117117
118118 ##
119119 # Parses +str+ into an RDoc::Markup::Document.
@@ -148,27 +148,11 @@ def self.parse(str)
148148 # structure (paragraphs, lists, and so on). Invoke an event handler as we
149149 # identify significant chunks.
150150
151- def initialize ( attribute_manager = nil )
152- @attribute_manager = attribute_manager || RDoc :: Markup :: AttributeManager . new
151+ def initialize
152+ @regexp_handlings = [ ]
153153 @output = nil
154154 end
155155
156- ##
157- # Add to the sequences used to add formatting to an individual word (such
158- # as *bold*). Matching entries will generate attributes that the output
159- # formatters can recognize by their +name+.
160-
161- def add_word_pair ( start , stop , name )
162- @attribute_manager . add_word_pair ( start , stop , name )
163- end
164-
165- ##
166- # Add to the sequences recognized as general markup.
167-
168- def add_html ( tag , name )
169- @attribute_manager . add_html ( tag , name )
170- end
171-
172156 ##
173157 # Add to other inline sequences. For example, we could add WikiWords using
174158 # something like:
@@ -178,7 +162,7 @@ def add_html(tag, name)
178162 # Each wiki word will be presented to the output formatter.
179163
180164 def add_regexp_handling ( pattern , name )
181- @attribute_manager . add_regexp_handling ( pattern , name )
165+ @regexp_handlings << [ pattern , name ]
182166 end
183167
184168 ##
@@ -197,15 +181,9 @@ def convert(input, formatter)
197181 end
198182
199183 autoload :Parser , "#{ __dir__ } /markup/parser"
184+ autoload :InlineParser , "#{ __dir__ } /markup/inline_parser"
200185 autoload :PreProcess , "#{ __dir__ } /markup/pre_process"
201186
202- # Inline markup classes
203- autoload :AttrChanger , "#{ __dir__ } /markup/attr_changer"
204- autoload :AttrSpan , "#{ __dir__ } /markup/attr_span"
205- autoload :Attributes , "#{ __dir__ } /markup/attributes"
206- autoload :AttributeManager , "#{ __dir__ } /markup/attribute_manager"
207- autoload :RegexpHandling , "#{ __dir__ } /markup/regexp_handling"
208-
209187 # RDoc::Markup AST
210188 autoload :BlankLine , "#{ __dir__ } /markup/blank_line"
211189 autoload :BlockQuote , "#{ __dir__ } /markup/block_quote"
0 commit comments