Assignments can now include "-" and "_" characters in their name.
This commit is contained in:
parent
a79b36b559
commit
7eb76ae8c9
@ -1,5 +1,5 @@
|
|||||||
name: specfileparser
|
name: specfileparser
|
||||||
version: 0.4.4
|
version: 0.4.5
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Philippe Pittoli <karchnu@karchnu.fr>
|
- Philippe Pittoli <karchnu@karchnu.fr>
|
||||||
|
@ -87,8 +87,8 @@ class SpecFileParser
|
|||||||
def parse_assignment (line : String)
|
def parse_assignment (line : String)
|
||||||
# puts "simple assignment: #{line}"
|
# puts "simple assignment: #{line}"
|
||||||
|
|
||||||
name = /([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]
|
value = /[a-zA-Z][a-zA-Z0-9-_]*: ([^#]*)/.match(line).try &.[1]
|
||||||
|
|
||||||
if name.nil?
|
if name.nil?
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user