Ruby NEWS.md module: remove comments when reading the file

This commit is contained in:
Moritz Bunkus 2017-04-14 14:46:07 +02:00
parent 5ae429f849
commit 32d5f15b2f

View File

@ -19,7 +19,10 @@ def parse_news file_name
end
end
IO.readlines(file_name).each do |line|
IO.read(file_name).
gsub(%r{<!--.*?-->}, '').
split(%r{\n}).
each do |line|
is_continuation = %r{^\s}.match(line)
line = line.chomp.gsub(%r{^\s+}, '').gsub(%r{\s+}, ' ')