diff options
author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-19 03:23:51 +0000 |
---|---|---|
committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-19 03:23:51 +0000 |
commit | 23d081b993746ffe47d2f42266e4b7856f2450c3 (patch) | |
tree | d1a2f12737c85090b06573455bced98c4f29489f /lib/rdoc/markup/simple_markup | |
parent | 86dcdabac87c8abb8947b15c939a43bffb7744e9 (diff) |
Fix typos (Doug Kearns)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup/simple_markup')
-rw-r--r-- | lib/rdoc/markup/simple_markup/preprocess.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rdoc/markup/simple_markup/preprocess.rb b/lib/rdoc/markup/simple_markup/preprocess.rb index dbf4b216ca..08ac66139b 100644 --- a/lib/rdoc/markup/simple_markup/preprocess.rb +++ b/lib/rdoc/markup/simple_markup/preprocess.rb @@ -45,7 +45,12 @@ module SM def include_file(name, indent) if (full_name = find_include_file(name)) content = File.open(full_name) {|f| f.read} - res = content.gsub(/^#?/, indent) + # strip leading '#'s, but only if all lines start with them + if content =~ /^[^#]/ + content.gsub(/^/, indent) + else + content.gsub(/^#?/, indent) + end else $stderr.puts "Couldn't find file to include: '#{name}'" '' |