diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-26 16:14:19 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-26 16:14:19 +0000 |
commit | c42a631063e79fab2369c1983a6f2a075b584f62 (patch) | |
tree | 2ea8c0381d5d491a5f46e210239e1494df57d240 /lib/rdoc/markup.rb | |
parent | 2142a5af51ce882641a060e69bc58c7322ff5188 (diff) |
Import RDoc 2.0.0 r56.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup.rb')
-rw-r--r-- | lib/rdoc/markup.rb | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/lib/rdoc/markup.rb b/lib/rdoc/markup.rb index 9334329d6b..fdd1a11736 100644 --- a/lib/rdoc/markup.rb +++ b/lib/rdoc/markup.rb @@ -11,8 +11,8 @@ require 'rdoc' # RDoc::Markup itself does no output formatting: this is left to a different # set of classes. # -# RDoc::Markup is extendable at runtime: you can add new markup elements to be -# recognised in the documents that RDoc::Markup parses. +# RDoc::Markup is extendable at runtime: you can add \new markup elements to +# be recognised in the documents that RDoc::Markup parses. # # RDoc::Markup is intended to be the basis for a family of tools which share # the common requirement that simple, plain-text should be rendered in a @@ -29,10 +29,9 @@ require 'rdoc' # paragraph. # # * If a paragraph starts with a "*", "-", or with "<digit>.", then it is -# taken to be the start of a list. The margin in increased to be the -# first non-space following the list start flag. Subsequent lines -# should be indented to this new margin until the list ends. For -# example: +# taken to be the start of a list. The margin in increased to be the first +# non-space following the list start flag. Subsequent lines should be +# indented to this \new margin until the list ends. For example: # # * this is a list with three paragraphs in # the first item. This is the first paragraph. @@ -102,7 +101,7 @@ require 'rdoc' # Unlike conventional Wiki markup, general markup can cross line # boundaries. You can turn off the interpretation of markup by # preceding the first character with a backslash, so \\\<b>bold -# text</b> and \\\*bold* produce \<b>bold text</b> and \*bold +# text</b> and \\\*bold* produce \<b>bold text</b> and \*bold* # respectively. # # * Hyperlinks to the web starting http:, mailto:, ftp:, or www. are @@ -118,17 +117,15 @@ require 'rdoc' # # == Synopsis # -# This code converts <tt>input_string</tt> to HTML. The conversion -# takes place in the +convert+ method, so you can use the same -# RDoc::Markup object to convert multiple input strings. +# This code converts +input_string+ to HTML. The conversion takes place in +# the +convert+ method, so you can use the same RDoc::Markup converter to +# convert multiple input strings. # -# require 'rdoc/markup' # require 'rdoc/markup/to_html' # -# p = RDoc::Markup.new # h = RDoc::Markup::ToHtml.new # -# puts p.convert(input_string, h) +# puts h.convert(input_string) # # You can extend the RDoc::Markup parser to recognise new markup # sequences, and to add special processing for text that matches a @@ -152,10 +149,10 @@ require 'rdoc' # # m.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD) # -# h = WikiHtml.new -# h.add_tag(:STRIKE, "<strike>", "</strike>") +# wh = WikiHtml.new +# wh.add_tag(:STRIKE, "<strike>", "</strike>") # -# puts "<body>" + m.convert(ARGF.read, h) + "</body>" +# puts "<body>#{wh.convert ARGF.read}</body>" # #-- # Author:: Dave Thomas, [email protected] |