summaryrefslogtreecommitdiff
path: root/lib/rdoc/markup.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-17 06:28:20 +0000
committeraycabta <aycabta@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-17 06:28:20 +0000
commit1b43644edc85a93bfc9228588c065c87f975cd93 (patch)
treeef3a60d0cbe73d15b39f6160853df9a23239a574 /lib/rdoc/markup.rb
parent2a59b579fed2fd49973ca73890f182299262909f (diff)
Merge rdoc-6.1.0.beta2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup.rb')
-rw-r--r--lib/rdoc/markup.rb22
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/rdoc/markup.rb b/lib/rdoc/markup.rb
index 08ecc6f7df..f20ee1169e 100644
--- a/lib/rdoc/markup.rb
+++ b/lib/rdoc/markup.rb
@@ -65,17 +65,16 @@
# puts h.convert(input_string)
#
# You can extend the RDoc::Markup parser to recognize new markup
-# sequences, and to add special processing for text that matches a
-# regular expression. Here we make WikiWords significant to the parser,
-# and also make the sequences {word} and \<no>text...</no> signify
+# sequences, and to add regexp handling. Here we make WikiWords significant to
+# the parser, and also make the sequences {word} and \<no>text...</no> signify
# strike-through text. We then subclass the HTML output class to deal
# with these:
#
# require 'rdoc'
#
# class WikiHtml < RDoc::Markup::ToHtml
-# def handle_special_WIKIWORD(special)
-# "<font color=red>" + special.text + "</font>"
+# def handle_regexp_WIKIWORD(target)
+# "<font color=red>" + target.text + "</font>"
# end
# end
#
@@ -83,7 +82,7 @@
# markup.add_word_pair("{", "}", :STRIKE)
# markup.add_html("no", :STRIKE)
#
-# markup.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)
+# markup.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)
#
# wh = WikiHtml.new RDoc::Options.new, markup
# wh.add_tag(:STRIKE, "<strike>", "</strike>")
@@ -800,13 +799,12 @@ https://github.com/ruby/rdoc/issues
# Add to other inline sequences. For example, we could add WikiWords using
# something like:
#
- # parser.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)
+ # parser.add_regexp_handling(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)
#
- # Each wiki word will be presented to the output formatter via the
- # accept_special method.
+ # Each wiki word will be presented to the output formatter.
- def add_special(pattern, name)
- @attribute_manager.add_special(pattern, name)
+ def add_regexp_handling(pattern, name)
+ @attribute_manager.add_regexp_handling(pattern, name)
end
##
@@ -832,7 +830,7 @@ https://github.com/ruby/rdoc/issues
autoload :AttrSpan, 'rdoc/markup/attr_span'
autoload :Attributes, 'rdoc/markup/attributes'
autoload :AttributeManager, 'rdoc/markup/attribute_manager'
- autoload :Special, 'rdoc/markup/special'
+ autoload :RegexpHandling, 'rdoc/markup/regexp_handling'
# RDoc::Markup AST
autoload :BlankLine, 'rdoc/markup/blank_line'