From 87ae0d70b2bc1c5aa4078602a343f2c2d3db3feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Mon, 17 Feb 2020 19:49:05 +0000 Subject: extend README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Asbjørn Sloth Tønnesen --- test/readme.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/readme.lua b/test/readme.lua index dd39dac..ead30dc 100644 --- a/test/readme.lua +++ b/test/readme.lua @@ -36,9 +36,12 @@ do local assignment = Ct(Cc('assignment') * assign_left * assign_mid * assign_right) local comment = P('--') * rest_of_line local indented_line = sp^2 * (comment + example + assignment) * sp^0 + local section = P('=')^1 + local install_hdr = P('Install') * nl * section * nl + local install_section = install_hdr * ((rest_of_line * nl) - section)^1 * section local anyline = rest_of_line - (sp * rest_of_line) local non_match = Ct(Cc('unable to parse line') * C(rest_of_line)) - local line = indented_line + anyline + non_match + local line = indented_line + install_section + anyline + non_match readme_parser = Ct((line * nl)^0 * line^-1 * -1) end -- cgit v1.2.1