diff options
author | Georgi Kirilov <> | 2020-11-22 15:10:50 +0200 |
---|---|---|
committer | Georgi Kirilov <> | 2023-10-04 18:24:59 +0800 |
commit | 132b6ca349f30b22bc67161a7c082dfb7397ffe7 (patch) | |
tree | f3eb640e4dd88e331fd50e5b122514a452e8de73 /pairs.lua | |
parent | c3a27083e9d3d15652bb68291ebe4e3b2ccad65e (diff) | |
download | vis-pairs-132b6ca349f30b22bc67161a7c082dfb7397ffe7.tar.gz |
Complete list of HTML void elements
TODO: Properly handle elements with optional end tags.
(The "implicit:" part.)
Diffstat (limited to 'pairs.lua')
-rw-r--r-- | pairs.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -304,7 +304,7 @@ vis.events.subscribe(vis.events.INIT, function() local function closing(s1, s2, cmpfunc) return l.Cmt(s1 * l.Cb("t") * l.C((1 - l.P(s2))^1) * s2, cmpfunc) end local tex_environment = {"\\begin{" * l.Cg(l.R("az", "AZ")^1, "t") * "}", closing("\\end{", "}", cmp), {"\\begin{\xef\xbf\xbd}", "\\end{\xef\xbf\xbd}"}, "environment name"} local tag_name = (l.S"_:" + l.R("az", "AZ")) * (l.R("az", "AZ", "09") + l.S"_:.-")^0 - local noslash = {--[[implicit:]] p=1, dt=1, dd=1, li=1, --[[void:]] img=1, input=1, hr=1, br=1, link=1, meta=1} + local noslash = {--[[implicit:]] p=1, dt=1, dd=1, li=1, --[[void:]] area=1, base=1, br=1, col=1, embed=1, hr=1, img=1, input=1, link=1, meta=1, param=1, source=1, track=1, wbr=1} local function is_not(_, _, v) return v ~= 1 end local html_tag = {"<" * l.Cg(l.Cmt(tag_name / string.lower / noslash, is_not), "t") * (1 - l.S"><")^0 * (">" - l.B"/"), closing("</", ">", casecmp), {"<\xef\xbf\xbd>", "</\xef\xbf\xbd>"}, "tag name"} local xml_tag = {"<" * l.Cg(tag_name, "t") * (1 - l.S"><")^0 * (">" - l.B"/"), closing("</", ">", cmp), {"<\xef\xbf\xbd>", "</\xef\xbf\xbd>"}, "tag name"} |