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

Side by Side Diff: html/render.go

Issue 7424044: code review 7424044: go.net/html: don't use Go tip io.ByteWriter (Closed)
Patch Set: diff -r d48de3be16b3 https://code.google.com/p/go.net Created 11 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package html 5 package html
6 6
7 import ( 7 import (
8 "bufio" 8 "bufio"
9 "errors" 9 "errors"
10 "fmt" 10 "fmt"
11 "io" 11 "io"
12 "strings" 12 "strings"
13 ) 13 )
14 14
15 type writer interface { 15 type writer interface {
16 io.Writer 16 io.Writer
17 » io.ByteWriter 17 » WriteByte(c byte) error // in Go 1.1, use io.ByteWriter
18 WriteString(string) (int, error) 18 WriteString(string) (int, error)
19 } 19 }
20 20
21 // Render renders the parse tree n to the given writer. 21 // Render renders the parse tree n to the given writer.
22 // 22 //
23 // Rendering is done on a 'best effort' basis: calling Parse on the output of 23 // Rendering is done on a 'best effort' basis: calling Parse on the output of
24 // Render will always result in something similar to the original tree, but it 24 // Render will always result in something similar to the original tree, but it
25 // is not necessarily an exact clone unless the original tree was 'well-formed'. 25 // is not necessarily an exact clone unless the original tree was 'well-formed'.
26 // 'Well-formed' is not easily specified; the HTML5 specification is 26 // 'Well-formed' is not easily specified; the HTML5 specification is
27 // complicated. 27 // complicated.
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 "img": true, 262 "img": true,
263 "input": true, 263 "input": true,
264 "keygen": true, 264 "keygen": true,
265 "link": true, 265 "link": true,
266 "meta": true, 266 "meta": true,
267 "param": true, 267 "param": true,
268 "source": true, 268 "source": true,
269 "track": true, 269 "track": true,
270 "wbr": true, 270 "wbr": true,
271 } 271 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

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