@@ -741,12 +741,8 @@ {seq = '!', parse = formatter 'emph'}; {seq = '*', parse = formatter 'strong'}; {seq = '~', parse = formatter 'strike'}; {seq = '+', parse = formatter 'insert'}; - {seq = '"', parse = rawcode}; - -- deprecated - {seq = '`\\', parse = rawcode}; - {seq = '\\\\', parse = rawcode}; {seq = '\\', parse = function(s, c) -- raw return { kind = 'raw'; spans = {s}; @@ -753,18 +749,19 @@ origin = c:clone(); } end}; {seq = '`', parse = formatter 'literal'}; + {seq = '"', parse = rawcode}; {seq = '$', parse = formatter 'variable'}; - {seq = '^', parse = function(s,c) --footnotes - local r, t = s:match '^([^%s]+)%s*(.-)$' + {seq = '^', parse = function(s, c) + -- TODO support for footnote sections + local fn, t = s:match '^([^%s]+)%s*(.-)$' return { kind = 'footnote'; - ref = r; - spans = ct.parse_span(t, c); + spans = (t and t~='') and ct.parse_span(t, c) or {}; + ref = fn; origin = c:clone(); } - -- TODO support for footnote sections end}; {seq = '=', parse = function(s,c) --math mode local tx = { ['%*'] = '×'; @@ -792,17 +789,8 @@ return { kind = 'deref'; spans = (t and t ~= "") and ct.parse_span(t, c) or {}; ref = r; - origin = c:clone(); - } - end}; - {seq = '^', parse = function(s, c) - local fn, t = s:match '^([^%s]+)%s*(.-)$' - return { - kind = 'footnote'; - spans = (t and t~='') and ct.parse_span(t, c) or {}; - ref = fn; origin = c:clone(); } end}; {seq = '>', parse = insert_link};