-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtag-converter.go
25 lines (23 loc) · 1016 Bytes
/
tag-converter.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package trafilatura
var (
listXmlListTags = []string{"ul", "ol", "dl"}
listXmlQuoteTags = []string{"blockquote", "pre", "q"}
listXmlHeadTags = []string{"h1", "h2", "h3", "h4", "h5", "h6", "summary"}
listXmlLbTags = []string{"br", "hr", "lb"}
listXmlHiTags = []string{"em", "i", "b", "strong", "u", "kbd", "samp", "tt", "var", "sub", "sup", "mark"}
listXmlRefTags = []string{"a"}
listXmlGraphicTags = []string{"img"}
listXmlItemTags = []string{"dd", "dt", "li"}
listXmlCellTags = []string{"th", "td"}
)
var (
mapXmlListTags = sliceToMap(listXmlListTags...)
mapXmlQuoteTags = sliceToMap(listXmlQuoteTags...)
mapXmlHeadTags = sliceToMap(listXmlHeadTags...)
mapXmlLbTags = sliceToMap(listXmlLbTags...)
mapXmlHiTags = sliceToMap(listXmlHiTags...)
mapXmlRefTags = sliceToMap(listXmlRefTags...)
mapXmlGraphicTags = sliceToMap(listXmlGraphicTags...)
mapXmlItemTags = sliceToMap(listXmlItemTags...)
mapXmlCellTags = sliceToMap(listXmlCellTags...)
)