diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-26 20:44:14 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-26 20:44:14 +0000 |
commit | 4e23c46ff4c2b6fb8c16a50b7123acb753f7b7d6 (patch) | |
tree | 03e7986b60a2ef8aca427d12f0288e8b09339f55 /lib/rdoc/markup/simple_markup/preprocess.rb | |
parent | 74831046c7240243c57efec65c11e2e71a9287f4 (diff) |
Merge from HEAD.
Add --system, --site, --home, --gems to ri.
Allow --doc-dir to be specified multiple times.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup/simple_markup/preprocess.rb')
-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 bbbae1b77c..101c9bdeb1 100644 --- a/lib/rdoc/markup/simple_markup/preprocess.rb +++ b/lib/rdoc/markup/simple_markup/preprocess.rb @@ -43,7 +43,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}'" '' |