From e26ae08b846557490a0ca3e2ada7d96a809b9fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C7=8Eili=C3=A0ng=20W=C3=A1ng?= Date: Tue, 5 May 2015 15:57:35 +0800 Subject: [PATCH] update generator with the HTML living standard https://html.spec.whatwg.org/multipage --- auto_chain.go | 6 +----- expr/auto_expr.go | 6 ++---- gen/gen.go | 8 ++++++++ gen/spec.go | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/auto_chain.go b/auto_chain.go index ee95cba..a318dfa 100644 --- a/auto_chain.go +++ b/auto_chain.go @@ -1,4 +1,4 @@ -// Copyright 2014, Hǎiliàng Wáng. All rights reserved. +// Copyright 2015, Hǎiliàng Wáng. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -652,10 +652,6 @@ func (n *Node) Id(pat ...string) *string { return n.Attr("id", pat...) } -func (n *Node) Inert(pat ...string) *string { - return n.Attr("inert", pat...) -} - func (n *Node) Inputmode(pat ...string) *string { return n.Attr("inputmode", pat...) } diff --git a/expr/auto_expr.go b/expr/auto_expr.go index 2b6b471..037fe07 100644 --- a/expr/auto_expr.go +++ b/expr/auto_expr.go @@ -1,9 +1,8 @@ -// Copyright 2014, Hǎiliàng Wáng. All rights reserved. +// Copyright 2015, Hǎiliàng Wáng. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package expr - +package expr // import "h12.me/html-query/expr" import ( "golang.org/x/net/html/atom" ) @@ -173,7 +172,6 @@ var ( HttpEquiv = AttrChecker("http-equiv") Icon = AttrChecker("icon") Id = AttrChecker("id") - Inert = AttrChecker("inert") Inputmode = AttrChecker("inputmode") Ismap = AttrChecker("ismap") Itemid = AttrChecker("itemid") diff --git a/gen/gen.go b/gen/gen.go index 853815b..4aae748 100644 --- a/gen/gen.go +++ b/gen/gen.go @@ -17,6 +17,10 @@ func (spec *Spec) GenerateExpr() { file := "output/auto_expr.go" f, err := os.Create(file) c(err) + fp(f, `// Copyright 2015, Hǎiliàng Wáng. All rights reserved.`) + fp(f, `// Use of this source code is governed by a BSD-style`) + fp(f, `// license that can be found in the LICENSE file.`) + fp(f, ``) fp(f, `package expr // import "h12.me/html-query/expr"`) fp(f, "import (") fp(f, `"golang.org/x/net/html/atom"`) @@ -55,6 +59,10 @@ func (spec *Spec) GenerateChain() { file := "output/auto_chain.go" f, err := os.Create(file) c(err) + fp(f, `// Copyright 2015, Hǎiliàng Wáng. All rights reserved.`) + fp(f, `// Use of this source code is governed by a BSD-style`) + fp(f, `// license that can be found in the LICENSE file.`) + fp(f, ``) fp(f, "package query") fp(f, "import (") fp(f, `. "h12.me/html-query/expr"`) diff --git a/gen/spec.go b/gen/spec.go index 7a740dc..8af96cc 100644 --- a/gen/spec.go +++ b/gen/spec.go @@ -16,7 +16,7 @@ import ( ) const ( - SpecUrl = `http://www.whatwg.org/specs/web-apps/current-work/multipage/section-index.html` + SpecUrl = `https://html.spec.whatwg.org/multipage/indices.html` // SPEC_URL = `http://www.w3.org/html/wg/drafts/html/master/single-page.html` )