lib/hoe.rb in hoe-4.0.3 vs lib/hoe.rb in hoe-4.0.4

- old
+ new

@@ -85,11 +85,11 @@ class Hoe include Rake::DSL if defined?(Rake::DSL) # duh - VERSION = "4.0.3" + VERSION = "4.0.4" @@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package, :publish, :gemcutter, :signing, :test] @bad_plugins = [] @@ -673,15 +673,16 @@ readme = input .lines .chunk { |l| l[/^(?:=+|#+)/] || "" } .map(&:last) .each_slice(2) - .map { |k, v| - kp = k.join - kp = kp.strip.chomp(":").split.last.downcase if k.size == 1 - [kp, v.join.strip] - } - .to_h + .to_h { |k, v| + kp = k.map { |s| + s.strip.chomp(":").sub(/(?:=+|#+)\s*/, '').downcase + }.join("\n") + + [kp, v.join.strip] + } unless readme.empty? then desc = readme.values_at(*description_sections).join("\n\n") summ = desc.split(/\.\s+/).first(summary_sentences).join(". ")