diff options
author | Lauris BH <lauris@nix.lv> | 2019-10-31 03:06:25 +0200 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-10-31 01:06:25 +0000 |
commit | 086a46994a9f59ba06bfacdf2041817ef2f6671c (patch) | |
tree | 1a54a4b9f74d2a1c8a3827f24dec2fb77b8a3554 /vendor/golang.org/x/net/html | |
parent | 690a8ec502ff2e162b6db9cfe1f0555cf6b37323 (diff) | |
download | gitea-086a46994a9f59ba06bfacdf2041817ef2f6671c.tar.gz gitea-086a46994a9f59ba06bfacdf2041817ef2f6671c.zip |
Rewrite markdown rendering to blackfriday v2 and rewrite orgmode rendering to go-org (#8560)
* Rewrite markdown rendering to blackfriday v2.0
* Fix style
* Fix go mod with golang 1.13
* Fix blackfriday v2 import
* Inital orgmode renderer migration to go-org
* Vendor go-org dependency
* Ignore errors :/
* Update go-org to latest version
* Update test
* Fix go-org test
* Remove unneeded code
* Fix comments
* Fix markdown test
* Fix blackfriday regression rendering HTML block
Diffstat (limited to 'vendor/golang.org/x/net/html')
-rw-r--r-- | vendor/golang.org/x/net/html/token.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go index e3c01d7c90..ae0d1b05cd 100644 --- a/vendor/golang.org/x/net/html/token.go +++ b/vendor/golang.org/x/net/html/token.go @@ -347,6 +347,7 @@ loop: break loop } if c != '/' { + z.raw.end-- continue loop } if z.readRawEndTag() || z.err != nil { @@ -1067,6 +1068,11 @@ loop: // Raw returns the unmodified text of the current token. Calling Next, Token, // Text, TagName or TagAttr may change the contents of the returned slice. +// +// The token stream's raw bytes partition the byte stream (up until an +// ErrorToken). There are no overlaps or gaps between two consecutive token's +// raw bytes. One implication is that the byte offset of the current token is +// the sum of the lengths of all previous tokens' raw bytes. func (z *Tokenizer) Raw() []byte { return z.buf[z.raw.start:z.raw.end] } |