From 50104cc32a498f7517a51c8dc93106c51c7a54b4 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Wed, 20 Apr 2011 15:44:41 +0200 Subject: Imported Upstream version 2011.03.07.1 --- src/pkg/html/doc.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pkg/html/doc.go') diff --git a/src/pkg/html/doc.go b/src/pkg/html/doc.go index c5338d078..4f5dee72d 100644 --- a/src/pkg/html/doc.go +++ b/src/pkg/html/doc.go @@ -69,6 +69,9 @@ call to Next. For example, to extract an HTML page's anchor text: } } +A Tokenizer typically skips over HTML comments. To return comment tokens, set +Tokenizer.ReturnComments to true before looping over calls to Next. + Parsing is done by calling Parse with an io.Reader, which returns the root of the parse tree (the document element) as a *Node. It is the caller's responsibility to ensure that the Reader provides UTF-8 encoded HTML. For -- cgit v1.2.3