From b2ab0ab20e2455ef112cf340e09e2f33cf641993 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 2 Mar 2014 15:07:14 +0100 Subject: distinguish between overlined and underline-only sections with the same adonment Closing #4 See http://docutils.sourceforge.net/docs/user/rst/quickstart.html#sections for the legalese. --- src/rst_parser.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/rst_parser.lua') diff --git a/src/rst_parser.lua b/src/rst_parser.lua index 93d8a11..3928161 100644 --- a/src/rst_parser.lua +++ b/src/rst_parser.lua @@ -127,6 +127,12 @@ state.addme = {} local valid_adornment do + --[[-- + + valid_adornment -- This subpattern tests if the string consists + entirely of one repeated adornment char. + + --]]-- local first_adornment = "" local adornment_char = S[[!"#$%&'()*+,-./:;<=>?@[]^_`{|}~]] + P[[\\]] local check_first = Cmt(adornment_char, function(_,_, first) -- cgit v1.2.3