3
0

Do not add ";" at the end of each code-block line.

This commit is contained in:
Philippe PITTOLI 2019-08-22 01:49:44 +02:00
parent 2694ecdae1
commit 157d6db909

View File

@ -140,7 +140,9 @@ class SpecFileParser
# puts "blank line or comment, still in a code block" # puts "blank line or comment, still in a code block"
when /^[ \t]+(.*)/ when /^[ \t]+(.*)/
# puts "code content: #{$~[1]}" # puts "code content: #{$~[1]}"
str << "#{$~[1].lstrip(" ").rstrip(" ")};" # old version: str << "#{$~[1].lstrip(" ").rstrip(" ")}"
# new version does not change the line (better shell integration)
str << $~[1]
else else
content.unshift line content.unshift line
break break
@ -193,10 +195,8 @@ class SpecFileParser
when /^[ \t]*#.*?$/ when /^[ \t]*#.*?$/
# 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]+(.*)/
v = $~[1].lstrip(" ").rstrip(" ") # puts "code content in section: #{$~[1]}"
# puts "freetext content in section: #{v}" str << $~[1]
# puts "code content: #{$~[1]}"
str << "#{v};"
else else
content.unshift line content.unshift line
break break