summaryrefslogtreecommitdiff
path: root/src/rst_parser.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2014-03-02 15:07:14 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2018-12-02 21:09:42 +0100
commitb2ab0ab20e2455ef112cf340e09e2f33cf641993 (patch)
tree049bbe93a01d9087b864cbcd2c80a284faec2bd9 /src/rst_parser.lua
parentfced673c2458283b9003b4ffc791ba44352f67c3 (diff)
downloadcontext-rst-b2ab0ab20e2455ef112cf340e09e2f33cf641993.tar.gz
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.
Diffstat (limited to 'src/rst_parser.lua')
-rw-r--r--src/rst_parser.lua6
1 files changed, 6 insertions, 0 deletions
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)