mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Allow multiple words in braces before a link
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c868c85dc4
commit
67eb473942
3 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-07-12 Dave Thomas <dave@pragprog.com>
|
||||
|
||||
* html_generator.rb: Support hyperlinks of the form {any text}[xxx]
|
||||
as well as stuff[xxx]
|
||||
|
||||
Sat Jul 10 09:30:24 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
|
||||
|
||||
* test/soap/marshal/test_struct.rb: use qualified build-tin class name
|
||||
|
|
|
@ -333,7 +333,8 @@ this margin are formatted verbatim.
|
|||
|
||||
Hyperlinks can also be of the form <tt>label</tt>[url], in which
|
||||
case the label is used in the displayed text, and <tt>url</tt> is
|
||||
used as the target.
|
||||
used as the target. If <tt>label</tt> contains multiple words,
|
||||
put it in braces: <em>{multi word label}[</em>url<em>]</em>.
|
||||
|
||||
9. Method parameter lists are extracted and displayed with
|
||||
the method description. If a method calls +yield+, then
|
||||
|
|
|
@ -177,7 +177,8 @@ module Generators
|
|||
|
||||
def handle_special_TIDYLINK(special)
|
||||
text = special.text
|
||||
unless text =~ /(\S+)\[(.*?)\]/
|
||||
# unless text =~ /(\S+)\[(.*?)\]/
|
||||
unless text =~ /\{(.*?)\}\[(.*?)\]/ or text =~ /(\S+)\[(.*?)\]/
|
||||
return text
|
||||
end
|
||||
label = $1
|
||||
|
@ -218,7 +219,8 @@ module Generators
|
|||
@markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK)
|
||||
|
||||
# and links of the form <text>[<url>]
|
||||
@markup.add_special(/\b(\S+?\[\S+?\.\S+?\])/, :TIDYLINK)
|
||||
@markup.add_special(/(((\{.*?\})|\b\S+?)\[\S+?\.\S+?\])/, :TIDYLINK)
|
||||
# @markup.add_special(/\b(\S+?\[\S+?\.\S+?\])/, :TIDYLINK)
|
||||
|
||||
end
|
||||
unless defined? @html_formatter
|
||||
|
|
Loading…
Add table
Reference in a new issue