]> Cypherpunks repositories - gostls13.git/commit
html: improve parsing of lists
authorAndrew Balholm <andybalholm@gmail.com>
Wed, 26 Oct 2011 03:02:30 +0000 (14:02 +1100)
committerNigel Tao <nigeltao@golang.org>
Wed, 26 Oct 2011 03:02:30 +0000 (14:02 +1100)
commit05ed18f4f6c661bfe01db0d8c25e5d7b65658a54
tree6e07f8042705d70da8f636c53be5ddb5f8cdbd65
parent6e318bda6c4236caf5a7f02d5ce545f5365094e0
html: improve parsing of lists

Make a <li> tag close the previous <li> element.
Make a </ul> tag close <li> elements.

Pass tests1.dat, test 33:
<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do-->

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <li>
|       "hello"
|     <li>
|       "world"
|       <ul>
|         "how"
|         <li>
|           "do"
|       "you"
|   <!-- do -->

R=nigeltao
CC=golang-dev
https://golang.org/cl/5321051
src/pkg/html/parse.go
src/pkg/html/parse_test.go