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 | 12900be7dfa346dc18e13aeb5a1e562cbb7aa664 (patch) | |
tree | d1a2f12737c85090b06573455bced98c4f29489f /lib/rdoc/markup | |
parent | c73c48c8b72e001b66500557fb870eb8a577eda4 (diff) | |
download | ruby-12900be7dfa346dc18e13aeb5a1e562cbb7aa664.tar.gz ruby-12900be7dfa346dc18e13aeb5a1e562cbb7aa664.tar.xz ruby-12900be7dfa346dc18e13aeb5a1e562cbb7aa664.zip |
Fix typos (Doug Kearns)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/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 dbf4b216c..08ac66139 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}'" '' |