summaryrefslogtreecommitdiff
path: root/lib/rdoc/text.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/text.rb')
-rw-r--r--lib/rdoc/text.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/rdoc/text.rb b/lib/rdoc/text.rb
index 22c3777ff9..c3218fdb2f 100644
--- a/lib/rdoc/text.rb
+++ b/lib/rdoc/text.rb
@@ -10,6 +10,8 @@ require 'strscan'
module RDoc::Text
+ attr_accessor :language
+
##
# Maps markup formats to classes that can parse them. If the format is
# unknown, "rdoc" format is used.
@@ -111,8 +113,12 @@ module RDoc::Text
def normalize_comment text
return text if text.empty?
- text = strip_stars text
- text = strip_hashes text
+ case language
+ when :ruby
+ text = strip_hashes text
+ when :c
+ text = strip_stars text
+ end
text = expand_tabs text
text = flush_left text
text = strip_newlines text