diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-15 20:15:17 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-05-15 20:15:17 +0200 |
commit | d14466a41dfef73ca9c32c5ef8e266a30a0ac03f (patch) | |
tree | c3772c218ae0e1c9546f759fdddb5f083712baa4 /tex/context/base/l-lpeg.lua | |
parent | 67b6132158de93e41f4ac7184b3d93d3e60cf10b (diff) | |
download | context-d14466a41dfef73ca9c32c5ef8e266a30a0ac03f.tar.gz |
2014-05-15 19:54:00
Diffstat (limited to 'tex/context/base/l-lpeg.lua')
-rw-r--r-- | tex/context/base/l-lpeg.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua index 6feb7089c..666af2103 100644 --- a/tex/context/base/l-lpeg.lua +++ b/tex/context/base/l-lpeg.lua @@ -107,7 +107,8 @@ local uppercase = R("AZ") local underscore = P("_") local hexdigit = digit + lowercase + uppercase local cr, lf, crlf = P("\r"), P("\n"), P("\r\n") -local newline = crlf + S("\r\n") -- cr + lf +----- newline = crlf + S("\r\n") -- cr + lf +local newline = P("\r") * (P("\n") + P(true)) + P("\n") local escaped = P("\\") * anything local squote = P("'") local dquote = P('"') @@ -141,8 +142,8 @@ patterns.utfbom_16_be = utfbom_16_be patterns.utfbom_16_le = utfbom_16_le patterns.utfbom_8 = utfbom_8 -patterns.utf_16_be_nl = P("\000\r\000\n") + P("\000\r") + P("\000\n") -patterns.utf_16_le_nl = P("\r\000\n\000") + P("\r\000") + P("\n\000") +patterns.utf_16_be_nl = P("\000\r\000\n") + P("\000\r") + P("\000\n") -- P("\000\r") * (P("\000\n") + P(true)) + P("\000\n") +patterns.utf_16_le_nl = P("\r\000\n\000") + P("\r\000") + P("\n\000") -- P("\r\000") * (P("\n\000") + P(true)) + P("\n\000") patterns.utf8one = R("\000\127") patterns.utf8two = R("\194\223") * utf8next |