all repos — grayfriday @ 45ab8d0dc4470fdfdf90a48ebbccb3c8924ebbb1

blackfriday fork with a few changes

dumb tweak that gives a little speed bump
Russ Ross russ@russross.com
Fri, 24 Jun 2011 21:53:46 -0600
commit

45ab8d0dc4470fdfdf90a48ebbccb3c8924ebbb1

parent

44db7217089aa573472bdce02829528e8fb554eb

1 files changed, 7 insertions(+), 0 deletions(-)

jump to
M html.gohtml.go

@@ -123,6 +123,13 @@

func attrEscape(out *bytes.Buffer, src []byte) { org := 0 for i, ch := range src { + // doing this check is a bit faster than falling into + // the switch statement. as the compiler improves, this + // should be unnecessary + if ch != '"' && ch != '&' && ch != '<' && ch != '>' { + continue + } + switch ch { case '<': if i > org {