]> Cypherpunks repositories - gostls13.git/commit
html: parse misnested formatting tags according to the HTML5 spec.
authorNigel Tao <nigeltao@golang.org>
Thu, 21 Jul 2011 01:20:54 +0000 (11:20 +1000)
committerNigel Tao <nigeltao@golang.org>
Thu, 21 Jul 2011 01:20:54 +0000 (11:20 +1000)
commit5a141064ed3a699ec1c6060c77e4ff1ca3faf85b
treea0ffdc2069b070fd166bb09b02472f587c1a14a3
parentd11c0f1dbb00afca09c48a2566ea30c9b2516e10
html: parse misnested formatting tags according to the HTML5 spec.
This is the "adoption agency" algorithm.

The test case input is "<a><p>X<a>Y</a>Z</p></a>". The correct parse is:
| <html>
|   <head>
|   <body>
|     <a>
|     <p>
|       <a>
|         "X"
|       <a>
|         "Y"
|       "Z"

R=gri
CC=golang-dev
https://golang.org/cl/4771042
src/pkg/html/Makefile
src/pkg/html/const.go [new file with mode: 0644]
src/pkg/html/node.go [new file with mode: 0644]
src/pkg/html/parse.go
src/pkg/html/parse_test.go