6 Commits

Author SHA1 Message Date
Pukki
312450e473 html: ensure <search> tag closes <p> and update tests
This change ensures that the <search> tag correctly closes an open <p> tag when encountered during parsing.

Changes:
- Added <search> to the list of elements that should close an open <p> tag in parse.go.
- Updated the second list in parse.go to ensure consistency.
- Updated html/atom/gen.go, table.go, and table_test.go accordingly.
- Modified parse_test.go to use strings.Builder instead of bytes.Buffer.
- Updated test error messages to follow Go’s conventions.
- Fixed an accidental colon in the comment in parse.go.

Change-Id: I5835da69f6bb0e14c483e55b7ae82915ae958dc1
Reviewed-on: https://go-review.googlesource.com/c/net/+/655457
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2025-03-12 15:46:46 -07:00
Kunpei Sakai
3121141a29 html/atom: add atom.Rb and atom.Rtc
Updates golang/go#23071

Change-Id: I07aae04757e83a3a03681a2ce92e4cab194ef64a
Reviewed-on: https://go-review.googlesource.com/107198
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2018-04-17 00:32:20 +00:00
Nigel Tao
309822c5b9 html/atom: add atom.Acronym
Fixes golang/go#23507

Change-Id: Id39b28f211dfdb6a5464752b8b62e2528b46286b
Reviewed-on: https://go-review.googlesource.com/91315
Reviewed-by: David Symonds <dsymonds@golang.org>
2018-02-01 03:00:42 +00:00
Kunpei Sakai
278c6cf336 html/atom: sync html table with the current whatwg spec
Some elements and attributes have been removed from the spec,
but are kept here for backwards compatibility.

Also, this makes gen.go support go:generate and write contents into
target files directly.

Finally, this makes `go generate` work on an entire directory.

Change-Id: I8d41840eec69eec1ef08527d8d71786612a3121d
Reviewed-on: https://go-review.googlesource.com/65152
Run-TryBot: Tom Bergan <tombergan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
2017-09-26 18:29:41 +00:00
Dmitry Savintsev
3d87fd621c x/net/html: Sync the html parser and atom with the current whatwg spec
The current documentation as well as set of atoms and attributes has
gotten slightly out of sync with the current state of the WHATWG
html5 specification. The change adds and removes several of the atoms
and attributes, updates the documentation (such as steps numbering in
inBodyEndTagFormatting) and modifies the spec URLs to https://

Change-Id: I6dfa52785858c1521301b20b1e585e19a08b1e98
Reviewed-on: https://go-review.googlesource.com/6173
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-03-03 04:37:39 +00:00
Nigel Tao
ea127e889c go.net/html: move exp/html and exp/html/atom here to the go.net
sub-repo.

It's a straight copy, except for these modifications:
* "exp/html" and "exp/html/atom" imports were renamed, and
* the "TODO... When this package moves out of exp" comment was
  deleted from atom/atom.go.

The matching change is at https://golang.org/cl/7317043

The rationale was discussed at
https://groups.google.com/d/topic/golang-nuts/Qq5hTQyPuLg/discussion

R=adg, remyoudompheng, dave
CC=golang-dev
https://golang.org/cl/7310063
2013-02-11 11:55:20 +11:00