Allow far more characters in key names.

This commit is contained in:
Chris 2013-10-24 23:34:38 +01:00
parent 325d0b0270
commit 07a3a609d8

View File

@ -139,16 +139,16 @@ sub read {
$section = $1;
# Attribues with quoted values. value can contain anything other than "
} elsif($line =~ /^\s*([\w. :-]+[\w.:-])\s*=\s*\"([^\"]+)\"/ ) {
} elsif($line =~ /^\s*(.*?\w)\s*=\s*\"([^\"]+)\"/ ) {
$self -> {$section} -> {$1} = $2;
# Handle attributes without quoted values - # or ; at any point will mark comments
} elsif(!$self -> {"inline_comments"} && $line =~ /^\s*([\w. :-]+[\w.:-])\s*=\s*(.+)$/ ) {
} elsif(!$self -> {"inline_comments"} && $line =~ /^\s*((.*?\w))\s*=\s*(.+)$/ ) {
my $key = $1;
$self -> {$section} -> {$key} = $2;
$self -> {$section} -> {$key} =~ s/^\s*(.*?)\s*$/$1/;
} elsif($self -> {"inline_comments"} && $line =~ /^\s*([\w. :-]+[\w.:-])\s*=\s*([^;#]+)/ ) {
} elsif($self -> {"inline_comments"} && $line =~ /^\s*((.*?\w))\s*=\s*([^;#]+)/ ) {
my $key = $1;
$self -> {$section} -> {$key} = $2;
$self -> {$section} -> {$key} =~ s/^\s*(.*?)\s*$/$1/;