diff options
author | Eric Wong <e@80x24.org> | 2015-10-14 23:22:05 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-10-14 23:53:24 +0000 |
commit | a0900794d5237dd743c7348d6d98448ccf19cc1a (patch) | |
tree | e9338642edbd0a5a6c3490f6b8c340986cbcd03b /lib/olddoc/readme.rb | |
parent | 10f1e1990989726c9a0741dd7b9b251d68692774 (diff) | |
download | olddoc-a0900794d5237dd743c7348d6d98448ccf19cc1a.tar.gz |
Some projects I maintain do not use RDoc and rely entirely on plain-text documentation. This allows "olddoc prepare" to run properly on projects which do not use RDoc but still use a README file where the title is the first line.
Diffstat (limited to 'lib/olddoc/readme.rb')
-rw-r--r-- | lib/olddoc/readme.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/olddoc/readme.rb b/lib/olddoc/readme.rb index 18f0205..e593517 100644 --- a/lib/olddoc/readme.rb +++ b/lib/olddoc/readme.rb @@ -16,9 +16,9 @@ module Olddoc::Readme # parses the README file in the top-level directory for project metadata def readme_metadata l = File.readlines(readme_path)[0].strip! - l.gsub!(/^=\s+/, '') or abort "#{l.inspect} doesn't start with '='" + l.gsub!(/^=\s+/, '') title = l.dup - if l.gsub!(/^(\w+\!)\s+/, '') # Rainbows! + if l.gsub!(/^(\w+\!)\s+/, '') # special case for Rainbows! return $1, l, title else return (l.split(/\s*[:-]\s*/, 2)).push(title) |