소스 검색

[Minor] Ical: Allow \r as line endings

tags/3.0
Vsevolod Stakhov 3 년 전
부모
커밋
5f7e2d6ad8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      lualib/lua_content/ical.lua

+ 1
- 1
lualib/lua_content/ical.lua 파일 보기

@@ -23,7 +23,7 @@ local ical_grammar
local function gen_grammar()
if not ical_grammar then
local wsp = l.S(" \t\v\f")
local crlf = l.P"\r"^-1 * l.P"\n"
local crlf = (l.P"\r"^-1 * l.P"\n") + l.P"\r"
local eol = (crlf * #crlf) + (crlf - (crlf^-1 * wsp))
local name = l.C((l.P(1) - (l.P":"))^1) / function(v) return (v:gsub("[\n\r]+%s","")) end
local value = l.C((l.P(1) - eol)^0) / function(v) return (v:gsub("[\n\r]+%s","")) end

Loading…
취소
저장