3
0

Adding "\n" on code block lines.

This commit is contained in:
Philippe PITTOLI 2019-08-22 02:08:56 +02:00
parent 8afadeb0dd
commit a79b36b559
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
name: specfileparser name: specfileparser
version: 0.4.3 version: 0.4.4
authors: authors:
- Philippe Pittoli <karchnu@karchnu.fr> - Philippe Pittoli <karchnu@karchnu.fr>

View File

@ -142,7 +142,7 @@ class SpecFileParser
# puts "code content: #{$~[1]}" # puts "code content: #{$~[1]}"
# old version: str << "#{$~[1].lstrip(" ").rstrip(" ")}" # old version: str << "#{$~[1].lstrip(" ").rstrip(" ")}"
# new version does not change the line (better shell integration) # new version does not change the line (better shell integration)
str << $~[1] str << "#{$~[1]}\n"
else else
content.unshift line content.unshift line
break break
@ -196,7 +196,7 @@ class SpecFileParser
# puts "blank line or comment, still in a free text in a section" # puts "blank line or comment, still in a free text in a section"
when /#{indent}[ \t]+(.*)/ when /#{indent}[ \t]+(.*)/
# puts "code content in section: #{$~[1]}" # puts "code content in section: #{$~[1]}"
str << $~[1] str << "#{$~[1]}\n"
else else
content.unshift line content.unshift line
break break