Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.

Commit 82d8e2f

Browse files
committed
update void-tags.go
1 parent cfcd495 commit 82d8e2f

1 file changed

Lines changed: 21 additions & 20 deletions

File tree

void-tags.go

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import (
88
"strings"
99
)
1010

11+
//Void tags
1112
const (
12-
Area = "area"
13+
Area string = "area"
1314
Base string = "base"
1415
Br string = "br"
1516
Col string = "col"
@@ -26,33 +27,33 @@ const (
2627
)
2728

2829
var (
29-
VoidTags = map[string]bool{
30-
"area": true,
31-
"base": true,
32-
"br": true,
33-
"col": true,
34-
"embed": true,
35-
"hr": true,
36-
"img": true,
37-
"input": true,
38-
"link": true,
39-
"meta": true,
40-
"param": true,
41-
"source": true,
42-
"track": true,
43-
"wbr": true,
30+
voidTags = map[string]bool{
31+
"area": true,
32+
"base": true,
33+
"br": true,
34+
"col": true,
35+
"embed": true,
36+
"hr": true,
37+
"img": true,
38+
"input": true,
39+
"link": true,
40+
"meta": true,
41+
"param": true,
42+
"source": true,
43+
"track": true,
44+
"wbr": true,
4445
"!doctype": true,
4546
}
4647
)
4748

48-
//IsVoidTag returns whether the tagName is a void tag or DTD
49-
func IsVoidTag(tagName string) bool{
49+
// IsVoidTag returns whether the tagName is a void tag or DTD
50+
func IsVoidTag(tagName string) bool {
5051
tagName = strings.TrimSpace(strings.ToLower(tagName))
51-
return VoidTags[tagName]
52+
return voidTags[tagName]
5253
}
5354

5455
/*
55-
A DTD defines the structure and the legal elements and attributes of an XML document.
56+
A DTD defines the structure and the legal elements and attributes of an XML document.
5657
*/
5758
const (
5859
//This is not a void el. but added it anyway.

0 commit comments

Comments
 (0)