summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-18 15:12:55 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-18 15:12:55 +0000
commita44efa20392e077a3b837da5e94d5716d88e9569 (patch)
treefbdcac126db2f63651173263108b186fd264ff15 /lib/rdoc
parent1af6e71f4c8b0545ff5f4f5b84b5de1c5a5590a3 (diff)
Strip extraneous spaces from included filename
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/markup/simple_markup/preprocess.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rdoc/markup/simple_markup/preprocess.rb b/lib/rdoc/markup/simple_markup/preprocess.rb
index 09892c2b6c..dbf4b216ca 100644
--- a/lib/rdoc/markup/simple_markup/preprocess.rb
+++ b/lib/rdoc/markup/simple_markup/preprocess.rb
@@ -20,13 +20,15 @@ module SM
def handle(text)
text.gsub!(/^([ \t#]*):(\w+):\s*(.+)?\n/) do
+ prefix = $1
directive = $2.downcase
param = $3
case directive
when "include"
- include_file($3, $1)
+ filename = param.split[0]
+ include_file(filename, prefix)
else
yield(directive, param)