aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/markup/to_bs.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-20 03:22:49 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-20 03:22:49 +0000
commit2ef9c50c6e405717d06362787c4549ca4f1c6485 (patch)
treeee99486567461dd5796f3d6edcc9e204187f2666 /lib/rdoc/markup/to_bs.rb
parentd7effd506f5b91a636f2e6452ef1946b923007c7 (diff)
downloadruby-2ef9c50c6e405717d06362787c4549ca4f1c6485.tar.gz
Import RDoc 3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup/to_bs.rb')
-rw-r--r--lib/rdoc/markup/to_bs.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/rdoc/markup/to_bs.rb b/lib/rdoc/markup/to_bs.rb
index e7af129824..931edd81ea 100644
--- a/lib/rdoc/markup/to_bs.rb
+++ b/lib/rdoc/markup/to_bs.rb
@@ -1,4 +1,4 @@
-require 'rdoc/markup/inline'
+require 'rdoc/markup/to_rdoc'
##
# Outputs RDoc markup with hot backspace action! You will probably need a
@@ -8,6 +8,9 @@ require 'rdoc/markup/inline'
class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
+ ##
+ # Returns a new ToBs that is ready for hot backspace action!
+
def initialize
super
@@ -22,8 +25,12 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
def init_tags
add_tag :BOLD, '+b', '-b'
add_tag :EM, '+_', '-_'
+ add_tag :TT, '' , '' # we need in_tt information maintained
end
+ ##
+ # Makes heading text bold.
+
def accept_heading heading
use_prefix or @res << ' ' * @indent
@res << @headings[heading.level][0]
@@ -44,7 +51,6 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
when '+_' then @in_em = true
when '-_' then @in_em = false
end
-
''
end