aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/rd
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-16 23:07:49 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-16 23:07:49 +0000
commit810008293fd8ce3a9d3d62dcf2f2229b98c2bd49 (patch)
tree7e06c2b0a08a3b29bf6a1c1cfd44a352fb2d82e2 /lib/rdoc/rd
parent10295ab2ff87b1189dcbe129a07a692417db53f6 (diff)
downloadruby-810008293fd8ce3a9d3d62dcf2f2229b98c2bd49.tar.gz
* lib/rdoc.rb: Updated VERSION.
* lib/rdoc/markup/attribute_manager.rb: Removed useless empty check. * lib/rdoc/markup/to_markdown.rb: Support links from other formats. * lib/rdoc/markup/formatter.rb: ditto. * lib/rdoc/markup/to_html.rb: ditto. * test/rdoc/test_rdoc_markup_formatter.rb: Test for above. * test/rdoc/test_rdoc_markup_to_html.rb: ditto. * test/rdoc/test_rdoc_markup_to_markdown.rb: ditto. * lib/rdoc/rd/block_parser.rb: Improved footnote display. Worked around bug in footnote conversion to Markdown. * test/rdoc/test_rdoc_rd_block_parser.rb: Test for above. * lib/rdoc/rd/inline_parser.rb: Fixed bug with emphasis inside verbatim. * test/rdoc/test_rdoc_rd_inline_parser.rb: Test for above. * test/rdoc/test_rdoc_parser_rd.rb: Use mu_pp, use shortcut methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/rd')
-rw-r--r--lib/rdoc/rd/block_parser.rb5
-rw-r--r--lib/rdoc/rd/inline_parser.rb2
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/rdoc/rd/block_parser.rb b/lib/rdoc/rd/block_parser.rb
index 1e7d872508..dd15e1262e 100644
--- a/lib/rdoc/rd/block_parser.rb
+++ b/lib/rdoc/rd/block_parser.rb
@@ -394,11 +394,12 @@ end
# Adds footnote +content+ to the document
def add_footnote content
- index = @footnotes.length + 1
+ index = @footnotes.length / 2 + 1
footmark_link = "{^#{index}}[rdoc-label:footmark-#{index}:foottext-#{index}]"
- @footnotes << RDoc::Markup::Paragraph.new(footmark_link, *content)
+ @footnotes << RDoc::Markup::Paragraph.new(footmark_link, ' ', *content)
+ @footnotes << RDoc::Markup::BlankLine.new
index
end
diff --git a/lib/rdoc/rd/inline_parser.rb b/lib/rdoc/rd/inline_parser.rb
index f330def44a..c3c1f4b030 100644
--- a/lib/rdoc/rd/inline_parser.rb
+++ b/lib/rdoc/rd/inline_parser.rb
@@ -1104,7 +1104,7 @@ def _reduce_101(val, _values, result)
end
def _reduce_102(val, _values, result)
- result = "<tt>#{val[1]}</tt>"
+ result = inline "<tt>#{val[1]}</tt>", val[1]
result
end