Skip to content

Commit 2cf345f

Browse files
committed
www/go-parse: Update to 2.4.2
Changelog picked from https://github.com/tdewolff/parse/releases v2.4.2 Add many hashes for CSS Add amp-boilerplate hash for HTML NewError now has fmt-style function signature Append 0x00 to signal EOF even if source already ends in 0x00 (which may be valid) v2.4.1 CSS: add Invert and Solid hashes v2.4.0 XML and HTML: Text() []byte returns nil for start tag closers XML and HTML: Text() []byte returns textual content for TextToken, CommentToken, ... Added Offset() int for all lexers and parsers that returns the current character offset in the input stream CSS: EOF after \ now properly handled as DelimToken and not EscapeToken in some cases v2.3.15 Bugfix: bad URL encoding resulted in no decoding at all, the new EncodeURL and DecodeURL are faster and never fail Bugfix: get correct Position if it is in the middle of a unicode codepoint v2.3.14 Re-parse input immediately when encountering parse error. Previously this was only done if the error was actually read which would save us from re-parsing the file (i.e. better performance). However, an error is (a) rare and (b) happens only once per file. Re-parsing on errors does not impact the performance of well formatted files, and a reliable error message is valued more. Bugfix: prevent infinite loop on error on input file that contains unicode code points (i.e. any character bigger than 0xC0 usually followed by more bytes). Improve error messages for parsers to include parser name and print offending byte(s) v2.3.13 Improve performance of ReplaceMultipleWhitespace by 20%--25% Add ReplaceEntities and ReplaceMultipleWhitespaceAndEntities to replace QuoteEntity. These allow to do replacements such as: " => ", " => ", " => ", ’ => ’, ' => '. Update list of HTML entity rewrites v2.3.12 Revert v2.3.11 and readd html.Keygen hash. v2.3.11 Add ReplaceEntities and remove entity replacement from EscapeAttrVal v2.3.10 Add and remove hashes for CSS and HTML v2.3.9 CSS: keep whitespace in unknown at rules v2.3.8 Remove import comments Fix bug in CSS parsing when encountering } in CSS inline v2.3.7 Fix position information on errors CSS: fix error position v2.3.6 Prevent panic when returning Bytes() on empty buffer Set proper context in errors Limit the length in context in errors In EqualFold only match upper/lower case on alphabet characters Add option to EscapeAttrVal to handle attribute values for XML (use double quotes) HTML: add hashes for RDFa attribute names JS: accept NULL characters as code JSON: report errors NULL characters
1 parent e37164d commit 2cf345f

12 files changed

Lines changed: 9 additions & 111 deletions

www/go-parse/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# $NetBSD: Makefile,v 1.16 2020/04/12 11:01:48 bsiegert Exp $
1+
# $NetBSD: Makefile,v 1.17 2020/04/18 14:18:41 nikita Exp $
22

3-
DISTNAME= parse-2.3.5
3+
DISTNAME= parse-2.4.2
44
PKGNAME= go-${DISTNAME}
5-
PKGREVISION= 14
65
MASTER_SITES= ${MASTER_SITE_GITHUB:=tdewolff/}
76
CATEGORIES= www
87
GITHUB_PROJECT= parse

www/go-parse/PLIST

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@comment $NetBSD: PLIST,v 1.1 2018/11/18 08:42:16 ryoon Exp $
1+
@comment $NetBSD: PLIST,v 1.2 2020/04/18 14:18:41 nikita Exp $
22
gopkg/pkg/${GO_PLATFORM}/github.com/tdewolff/parse.a
33
gopkg/pkg/${GO_PLATFORM}/github.com/tdewolff/parse/buffer.a
44
gopkg/pkg/${GO_PLATFORM}/github.com/tdewolff/parse/css.a
@@ -31,6 +31,7 @@ gopkg/src/github.com/tdewolff/parse/css/parse_test.go
3131
gopkg/src/github.com/tdewolff/parse/css/util.go
3232
gopkg/src/github.com/tdewolff/parse/css/util_test.go
3333
gopkg/src/github.com/tdewolff/parse/error.go
34+
gopkg/src/github.com/tdewolff/parse/error_test.go
3435
gopkg/src/github.com/tdewolff/parse/go.mod
3536
gopkg/src/github.com/tdewolff/parse/go.sum
3637
gopkg/src/github.com/tdewolff/parse/html/README.md

www/go-parse/distinfo

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
$NetBSD: distinfo,v 1.2 2019/12/22 10:38:15 bsiegert Exp $
1+
$NetBSD: distinfo,v 1.3 2020/04/18 14:18:41 nikita Exp $
22

3-
SHA1 (parse-2.3.5.tar.gz) = e42a580abc7b74a88abd707bd63a15245750bbbf
4-
RMD160 (parse-2.3.5.tar.gz) = 7ec2fd6987d9c4fddb21669d1b1980f640786a7d
5-
SHA512 (parse-2.3.5.tar.gz) = e32da6cd04de9535b612adce1064203a6d50b8065104353efbd9088f2807de22433c9b1d112e99184683cf212d229c0a674afb77732ec254293c079a47fff47e
6-
Size (parse-2.3.5.tar.gz) = 75027 bytes
7-
SHA1 (patch-buffer_buffer.go) = abd4848578932ce02b7b76f097d6c12974fb1a6a
8-
SHA1 (patch-buffer_lexer.go) = e8fde846ea9e658a6c73d2b4e0cf7b35909d9d5a
9-
SHA1 (patch-buffer_lexer__test.go) = 15a422e2840db3f67d862f055cb6400ea0efca87
10-
SHA1 (patch-buffer_reader.go) = ca66390b91fef7576e3e53d58dd367bb9f8b6d04
11-
SHA1 (patch-buffer_reader__test.go) = 071481b95d888eab77d97ed6656b240e038a7c2d
12-
SHA1 (patch-buffer_streamlexer.go) = 7c01833dd18d37ade71e9461aa8e009c1ac143b2
13-
SHA1 (patch-buffer_streamlexer__test.go) = 7499b4a93e48905ed2d453abdb001060eb61d530
14-
SHA1 (patch-buffer_writer.go) = 6afbdb31bb0ff88ca7ceacab86c40eef830a800e
15-
SHA1 (patch-buffer_writer__test.go) = bf18af95bb22c3093f2124e36784ea749fc39afd
3+
SHA1 (parse-2.4.2.tar.gz) = 499e9733005fd595fe437b523d8a3ee15d38a4c0
4+
RMD160 (parse-2.4.2.tar.gz) = e3660370f96ecc50c984172dea0c72a28ae50e94
5+
SHA512 (parse-2.4.2.tar.gz) = bcc97dff30b568d804042165d6ee8b866e84e70a3bcbecd59b237dc1add5a42ba8d01e59a163b16f7dea86dd709f2c817e23b1b1a9c68470e0e6198b10def661
6+
Size (parse-2.4.2.tar.gz) = 88729 bytes

www/go-parse/patches/patch-buffer_buffer.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

www/go-parse/patches/patch-buffer_lexer.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

www/go-parse/patches/patch-buffer_lexer__test.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

www/go-parse/patches/patch-buffer_reader.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

www/go-parse/patches/patch-buffer_reader__test.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

www/go-parse/patches/patch-buffer_streamlexer.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

www/go-parse/patches/patch-buffer_streamlexer__test.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)