]> Cypherpunks repositories - gostls13.git/commit
html: improve parsing of tables
authorAndrew Balholm <andybalholm@gmail.com>
Wed, 26 Oct 2011 00:36:46 +0000 (11:36 +1100)
committerNigel Tao <nigeltao@golang.org>
Wed, 26 Oct 2011 00:36:46 +0000 (11:36 +1100)
commit6e318bda6c4236caf5a7f02d5ce545f5365094e0
tree720326c113118f3edb9215bb91a7663093cd3687
parent7959aeb0f9d143986f1230d907280b3b9de7f1f7
html: improve parsing of tables

When foster parenting, merge adjacent text nodes.
Properly close table row at </tr> tag.

Pass tests1.dat, test 32:
<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->

| <!-- - -->
| <html>
|   <head>
|   <body>
|     <font>
|       <div>
|         "helloexcite!"
|         <b>
|           "me!"
|         <table>
|           <tbody>
|             <tr>
|               <th>
|                 <i>
|                   "please!"
|             <!-- X -->

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