Coverage for src/minihtml/tags/__init__.py: 100%
119 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-21 09:51 +0100
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-21 09:51 +0100
1from minihtml import make_prototype
2from minihtml._core import PrototypeEmpty, PrototypeNonEmpty
4__all__ = [
5 # [[[cog
6 # from yaml import safe_load
7 #
8 # with open(TAGS) as f:
9 # SPEC = safe_load(f)
10 #
11 # for tag in SPEC["tags"]:
12 # info = SPEC["tags"][tag] or {}
13 # cog.outl(f'"{info.get("alias", tag)}",')
14 # ]]]
15 "html",
16 "head",
17 "title",
18 "base",
19 "link",
20 "meta",
21 "style",
22 "body",
23 "article",
24 "section",
25 "nav",
26 "aside",
27 "h1",
28 "h2",
29 "h3",
30 "h4",
31 "h5",
32 "h6",
33 "hgroup",
34 "header",
35 "footer",
36 "address",
37 "p",
38 "hr",
39 "pre",
40 "blockquote",
41 "ol",
42 "ul",
43 "menu",
44 "li",
45 "dl",
46 "dt",
47 "dd",
48 "figure",
49 "figcaption",
50 "main",
51 "search",
52 "div",
53 "a",
54 "em",
55 "strong",
56 "small",
57 "s",
58 "cite",
59 "q",
60 "dfn",
61 "abbr",
62 "ruby",
63 "rt",
64 "rp",
65 "data",
66 "time",
67 "code",
68 "var",
69 "samp",
70 "kbd",
71 "sub",
72 "sup",
73 "i",
74 "b",
75 "u",
76 "mark",
77 "bdi",
78 "bdo",
79 "span",
80 "br",
81 "wbr",
82 "ins",
83 "del_",
84 "picture",
85 "source",
86 "img",
87 "iframe",
88 "embed",
89 "object_",
90 "video",
91 "audio",
92 "track",
93 "map_",
94 "area",
95 "table",
96 "caption",
97 "colgroup",
98 "col",
99 "tbody",
100 "thead",
101 "tfoot",
102 "tr",
103 "td",
104 "th",
105 "form",
106 "label",
107 "input_",
108 "button",
109 "select",
110 "datalist",
111 "optgroup",
112 "option",
113 "textarea",
114 "output",
115 "progress",
116 "meter",
117 "fieldset",
118 "legend",
119 "details",
120 "summary",
121 "dialog",
122 "script",
123 "noscript",
124 "template_",
125 "slot",
126 "canvas",
127 # [[[end]]] (checksum: 8f9d1678585a7aed604675580615b43b)
128]
130# [[[cog
131# for tag in SPEC["tags"]:
132# info = SPEC["tags"][tag] or {}
133# if info.get("hidden"):
134# name, alias = info["alias"], None
135# else:
136# name, alias = tag, info.get("alias")
137#
138# type = "PrototypeEmpty" if info.get("empty", False) else "PrototypeNonEmpty"
139#
140# cog.out(f'{name}: {type} = make_prototype("{tag}"')
141# if info.get("inline", False):
142# cog.out(", inline=True")
143# if info.get("empty", False):
144# cog.out(", empty=True")
145# else:
146# if info.get("omit_end_tag", False):
147# cog.out(", omit_end_tag=True")
148# cog.out(")\n")
149# if alias:
150# cog.outl(f"{alias} = {name}")
151#
152# ]]]
153html: PrototypeNonEmpty = make_prototype("html")
154head: PrototypeNonEmpty = make_prototype("head")
155title: PrototypeNonEmpty = make_prototype("title")
156base: PrototypeEmpty = make_prototype("base", empty=True)
157link: PrototypeEmpty = make_prototype("link", empty=True)
158meta: PrototypeEmpty = make_prototype("meta", empty=True)
159style: PrototypeNonEmpty = make_prototype("style")
160body: PrototypeNonEmpty = make_prototype("body")
161article: PrototypeNonEmpty = make_prototype("article")
162section: PrototypeNonEmpty = make_prototype("section")
163nav: PrototypeNonEmpty = make_prototype("nav")
164aside: PrototypeNonEmpty = make_prototype("aside")
165h1: PrototypeNonEmpty = make_prototype("h1")
166h2: PrototypeNonEmpty = make_prototype("h2")
167h3: PrototypeNonEmpty = make_prototype("h3")
168h4: PrototypeNonEmpty = make_prototype("h4")
169h5: PrototypeNonEmpty = make_prototype("h5")
170h6: PrototypeNonEmpty = make_prototype("h6")
171hgroup: PrototypeNonEmpty = make_prototype("hgroup")
172header: PrototypeNonEmpty = make_prototype("header")
173footer: PrototypeNonEmpty = make_prototype("footer")
174address: PrototypeNonEmpty = make_prototype("address")
175p: PrototypeNonEmpty = make_prototype("p")
176hr: PrototypeEmpty = make_prototype("hr", empty=True)
177pre: PrototypeNonEmpty = make_prototype("pre")
178blockquote: PrototypeNonEmpty = make_prototype("blockquote")
179ol: PrototypeNonEmpty = make_prototype("ol")
180ul: PrototypeNonEmpty = make_prototype("ul")
181menu: PrototypeNonEmpty = make_prototype("menu")
182li: PrototypeNonEmpty = make_prototype("li")
183dl: PrototypeNonEmpty = make_prototype("dl")
184dt: PrototypeNonEmpty = make_prototype("dt")
185dd: PrototypeNonEmpty = make_prototype("dd")
186figure: PrototypeNonEmpty = make_prototype("figure")
187figcaption: PrototypeNonEmpty = make_prototype("figcaption")
188main: PrototypeNonEmpty = make_prototype("main")
189search: PrototypeNonEmpty = make_prototype("search")
190div: PrototypeNonEmpty = make_prototype("div")
191a: PrototypeNonEmpty = make_prototype("a", inline=True)
192em: PrototypeNonEmpty = make_prototype("em", inline=True)
193strong: PrototypeNonEmpty = make_prototype("strong", inline=True)
194small: PrototypeNonEmpty = make_prototype("small", inline=True)
195s: PrototypeNonEmpty = make_prototype("s", inline=True)
196cite: PrototypeNonEmpty = make_prototype("cite", inline=True)
197q: PrototypeNonEmpty = make_prototype("q", inline=True)
198dfn: PrototypeNonEmpty = make_prototype("dfn", inline=True)
199abbr: PrototypeNonEmpty = make_prototype("abbr", inline=True)
200ruby: PrototypeNonEmpty = make_prototype("ruby", inline=True)
201rt: PrototypeNonEmpty = make_prototype("rt", inline=True)
202rp: PrototypeNonEmpty = make_prototype("rp", inline=True)
203data: PrototypeNonEmpty = make_prototype("data", inline=True)
204time: PrototypeNonEmpty = make_prototype("time", inline=True)
205code: PrototypeNonEmpty = make_prototype("code", inline=True)
206var: PrototypeNonEmpty = make_prototype("var", inline=True)
207samp: PrototypeNonEmpty = make_prototype("samp", inline=True)
208kbd: PrototypeNonEmpty = make_prototype("kbd", inline=True)
209sub: PrototypeNonEmpty = make_prototype("sub", inline=True)
210sup: PrototypeNonEmpty = make_prototype("sup", inline=True)
211i: PrototypeNonEmpty = make_prototype("i", inline=True)
212b: PrototypeNonEmpty = make_prototype("b", inline=True)
213u: PrototypeNonEmpty = make_prototype("u", inline=True)
214mark: PrototypeNonEmpty = make_prototype("mark", inline=True)
215bdi: PrototypeNonEmpty = make_prototype("bdi", inline=True)
216bdo: PrototypeNonEmpty = make_prototype("bdo", inline=True)
217span: PrototypeNonEmpty = make_prototype("span", inline=True)
218br: PrototypeEmpty = make_prototype("br", inline=True, empty=True)
219wbr: PrototypeEmpty = make_prototype("wbr", inline=True, empty=True)
220ins: PrototypeNonEmpty = make_prototype("ins", inline=True)
221del_: PrototypeNonEmpty = make_prototype("del", inline=True)
222picture: PrototypeNonEmpty = make_prototype("picture")
223source: PrototypeEmpty = make_prototype("source", empty=True)
224img: PrototypeEmpty = make_prototype("img", inline=True, empty=True)
225iframe: PrototypeEmpty = make_prototype("iframe", empty=True)
226embed: PrototypeEmpty = make_prototype("embed", empty=True)
227object: PrototypeNonEmpty = make_prototype("object")
228object_ = object
229video: PrototypeNonEmpty = make_prototype("video")
230audio: PrototypeNonEmpty = make_prototype("audio")
231track: PrototypeEmpty = make_prototype("track", empty=True)
232map: PrototypeNonEmpty = make_prototype("map")
233map_ = map
234area: PrototypeEmpty = make_prototype("area", empty=True)
235table: PrototypeNonEmpty = make_prototype("table")
236caption: PrototypeNonEmpty = make_prototype("caption")
237colgroup: PrototypeNonEmpty = make_prototype("colgroup")
238col: PrototypeEmpty = make_prototype("col", empty=True)
239tbody: PrototypeNonEmpty = make_prototype("tbody")
240thead: PrototypeNonEmpty = make_prototype("thead")
241tfoot: PrototypeNonEmpty = make_prototype("tfoot")
242tr: PrototypeNonEmpty = make_prototype("tr")
243td: PrototypeNonEmpty = make_prototype("td")
244th: PrototypeNonEmpty = make_prototype("th")
245form: PrototypeNonEmpty = make_prototype("form")
246label: PrototypeNonEmpty = make_prototype("label")
247input: PrototypeEmpty = make_prototype("input", empty=True)
248input_ = input
249button: PrototypeNonEmpty = make_prototype("button")
250select: PrototypeNonEmpty = make_prototype("select")
251datalist: PrototypeNonEmpty = make_prototype("datalist")
252optgroup: PrototypeNonEmpty = make_prototype("optgroup")
253option: PrototypeNonEmpty = make_prototype("option")
254textarea: PrototypeNonEmpty = make_prototype("textarea")
255output: PrototypeNonEmpty = make_prototype("output")
256progress: PrototypeNonEmpty = make_prototype("progress")
257meter: PrototypeNonEmpty = make_prototype("meter")
258fieldset: PrototypeNonEmpty = make_prototype("fieldset")
259legend: PrototypeNonEmpty = make_prototype("legend")
260details: PrototypeNonEmpty = make_prototype("details")
261summary: PrototypeNonEmpty = make_prototype("summary")
262dialog: PrototypeNonEmpty = make_prototype("dialog")
263script: PrototypeNonEmpty = make_prototype("script")
264noscript: PrototypeNonEmpty = make_prototype("noscript")
265template: PrototypeNonEmpty = make_prototype("template")
266template_ = template
267slot: PrototypeNonEmpty = make_prototype("slot")
268canvas: PrototypeNonEmpty = make_prototype("canvas")
269# [[[end]]] (checksum: dc6bb8076cc3edce877f569e90f53c46)