vendor/github.com/russross/blackfriday/esc.go
changeset 246 0998f404dd31
parent 245 910f00ab2799
child 247 1ca743b3eb80
--- a/vendor/github.com/russross/blackfriday/esc.go	Sun Jan 13 12:58:50 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-package blackfriday
-
-import (
-	"html"
-	"io"
-)
-
-var htmlEscaper = [256][]byte{
-	'&': []byte("&"),
-	'<': []byte("&lt;"),
-	'>': []byte("&gt;"),
-	'"': []byte("&quot;"),
-}
-
-func escapeHTML(w io.Writer, s []byte) {
-	var start, end int
-	for end < len(s) {
-		escSeq := htmlEscaper[s[end]]
-		if escSeq != nil {
-			w.Write(s[start:end])
-			w.Write(escSeq)
-			start = end + 1
-		}
-		end++
-	}
-	if start < len(s) && end <= len(s) {
-		w.Write(s[start:end])
-	}
-}
-
-func escLink(w io.Writer, text []byte) {
-	unesc := html.UnescapeString(string(text))
-	escapeHTML(w, []byte(unesc))
-}