summaryrefslogtreecommitdiff
path: root/html/html.go
diff options
context:
space:
mode:
authorAdam Scarr <adam@vektah.net>2017-08-10 21:58:14 +1000
committerAdam Scarr <adam@vektah.net>2017-08-10 22:01:06 +1000
commita0e66b1c46ec57218f8a95a21ace7cbbceb29ec2 (patch)
tree630056d07ca6b44f7a747b7872ba422c6c301d85 /html/html.go
parentaf542eff9e1e51561a9efa37685ee07b1d01b53e (diff)
Document cuts
Diffstat (limited to 'html/html.go')
-rw-r--r--html/html.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/html/html.go b/html/html.go
index 0def587..e2dff0b 100644
--- a/html/html.go
+++ b/html/html.go
@@ -42,17 +42,17 @@ var (
return Result{Result: attr}
})
- tstart = Seq("<", Cut, identifier, attrs, ">")
+ tstart = Seq("<", identifier, Cut, attrs, ">")
tend = Seq("</", Cut, identifier, ">")
)
func init() {
- tag = Map(Seq(tstart, elements, tend), func(node Result) Result {
+ tag = Map(Seq(tstart, Cut, elements, tend), func(node Result) Result {
openTag := node.Child[0]
return Result{Result: Tag{
- Name: openTag.Child[2].Token,
+ Name: openTag.Child[1].Token,
Attributes: openTag.Child[3].Result.(map[string]string),
- Body: node.Child[1].Result.([]interface{}),
+ Body: node.Child[2].Result.([]interface{}),
}}
})