From 23ff1b009f3b4df6754848196d7556c11c323d83 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 27 Apr 2016 22:34:17 +0200 Subject: [parsers] fix rhs parsing in configuration Fix issue #344 An incomplete matching rule for determining configuration values caused return bytes (0x0d) to leak into the configuration if Windows style newlines are used. Fixed by adapting the pattern. --- src/luaotfload-parsers.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua index 83e2a54..307c35c 100644 --- a/src/luaotfload-parsers.lua +++ b/src/luaotfload-parsers.lua @@ -722,10 +722,10 @@ local blank_line = ws * eol local skip_line = comment_line + blank_line local ini_id_char = alpha + (dash / "_") local ini_id = Cs(alpha * ini_id_char^0) / stringlower -local ini_value_char = (valid_escapes + (1 - newline - backslash - comment_char)) +local ini_value_char = (valid_escapes + (1 - linebreak - backslash - comment_char)) local ini_value = (Cs (ini_value_char^0) / string.strip) * (comment_char * (1 - eol)^0)^-1 -local ini_string_char = (valid_escapes + (1 - newline - dquote - backslash)) +local ini_string_char = (valid_escapes + (1 - linebreak - dquote - backslash)) local ini_string = dquote * Cs (ini_string_char^0) * dquote -- cgit v1.2.3