diff options
author | Arne Georg Gleditsch <argggh@taniquetil.(none)> | 2009-08-17 08:52:04 +0200 |
---|---|---|
committer | Arne Georg Gleditsch <argggh@taniquetil.(none)> | 2009-08-17 08:52:04 +0200 |
commit | 7f5d4f37d8d3240b8c3a91be79c0585e6ca8a9d4 (patch) | |
tree | f2f78cd7073fbf6a2dc238114e9fe834b40b9959 /lib/LXRng/Lang/Kconfig.pm | |
parent | 18bbb85315b190ccf5698fab3a39b576e7a2dbcd (diff) |
Handle embedded escaped string-terminators.
Diffstat (limited to 'lib/LXRng/Lang/Kconfig.pm')
-rw-r--r-- | lib/LXRng/Lang/Kconfig.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/LXRng/Lang/Kconfig.pm b/lib/LXRng/Lang/Kconfig.pm index 2239a87..4c8df6c 100644 --- a/lib/LXRng/Lang/Kconfig.pm +++ b/lib/LXRng/Lang/Kconfig.pm @@ -58,8 +58,8 @@ sub reserved { sub parsespec { return ['atom', '\\\\.', undef, 'comment', '#', "\$", - 'string', '"', '"', - 'string', "'", "'", + 'string', '"(?:[^\\\\]*\\\\.)*[^\\\\]*"', undef, + 'string', "'(?:[^\\\\]*\\\\.)*[^\\\\]*'", undef, 'help', 'help', "^(?=[^ \t\n])", 'include', '^source\s+"', '"']; } @@ -85,8 +85,8 @@ sub markuphandlers { qr/[^\n\"\']+/ => sub { $markup->format_string(@_) }; $subst{'string'} = new Subst::Complex - qr/\n/ => $format_newline, - qr/[^\n\"\']+/ => sub { $markup->format_string(@_) }; + qr/\n/ => $format_newline, + qr/[^\n]+/ => sub { $markup->format_string(@_) }; $subst{'include'} = new Subst::Complex qr/\n/ => $format_newline, |