Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3237)

Issue 4771042: code review 4771042: html: parse misnested formatting tags according to the ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by nigeltao
Modified:
12 years, 9 months ago
Reviewers:
CC:
gri, golang-dev
Visibility:
Public.

Description

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"

Patch Set 1 #

Patch Set 2 : diff -r 82757b74f47f https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 82757b74f47f https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 4 : diff -r ec21d1bbe91f https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+421 lines, -64 lines) Patch
M src/pkg/html/Makefile View 1 1 chunk +2 lines, -0 lines 0 comments Download
A src/pkg/html/const.go View 1 1 chunk +90 lines, -0 lines 0 comments Download
A src/pkg/html/node.go View 1 2 3 1 chunk +146 lines, -0 lines 0 comments Download
M src/pkg/html/parse.go View 1 13 chunks +180 lines, -63 lines 0 comments Download
M src/pkg/html/parse_test.go View 1 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 3
nigeltao
Hello gri@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 9 months ago (2011-07-19 08:33:45 UTC) #1
gri
LGTM http://codereview.appspot.com/4771042/diff/2002/src/pkg/html/node.go File src/pkg/html/node.go (right): http://codereview.appspot.com/4771042/diff/2002/src/pkg/html/node.go#newcode40 src/pkg/html/node.go:40: panic("html: Node.Add called for a non-orphaned child Node") ...
12 years, 9 months ago (2011-07-20 23:48:57 UTC) #2
nigeltao
12 years, 9 months ago (2011-07-21 01:21:04 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=0713c6cee448 ***

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
http://codereview.appspot.com/4771042
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b