3
0

Assignments can now include "-" and "_" characters in their name.

This commit is contained in:
Philippe PITTOLI 2019-08-29 00:27:00 +02:00
parent a79b36b559
commit 7eb76ae8c9
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -87,8 +87,8 @@ class SpecFileParser
def parse_assignment (line : String)
# puts "simple assignment: #{line}"
name = /([a-zA-Z][a-zA-Z0-9]*):/.match(line).try &.[1]
value = /[a-zA-Z][a-zA-Z0-9]*: ([^#]*)/.match(line).try &.[1]
name = /([a-zA-Z][a-zA-Z0-9-_]*):/.match(line).try &.[1]
value = /[a-zA-Z][a-zA-Z0-9-_]*: ([^#]*)/.match(line).try &.[1]
if name.nil?
return