summaryrefslogtreecommitdiffstats
path: root/vendor/gitlab.com/golang-commonmark/linkify/charset.go
diff options
context:
space:
mode:
authorBenjamin <b.mpickford@outlook.com>2019-11-18 06:18:01 +1000
committerWim <wim@42.be>2019-11-17 21:18:01 +0100
commit0917dc876613fd71c9726a34bf0138b4f5121be9 (patch)
tree1eacaadaa4869e8f74ccf65c684c2a80f90787f9 /vendor/gitlab.com/golang-commonmark/linkify/charset.go
parentaba86855b5f71c9809d892a7eebc6b69872fcd5b (diff)
downloadmatterbridge-msglm-0917dc876613fd71c9726a34bf0138b4f5121be9.tar.gz
matterbridge-msglm-0917dc876613fd71c9726a34bf0138b4f5121be9.tar.bz2
matterbridge-msglm-0917dc876613fd71c9726a34bf0138b4f5121be9.zip
Update markdown parsing library to github.com/gomarkdown/markdown (#944)
Diffstat (limited to 'vendor/gitlab.com/golang-commonmark/linkify/charset.go')
-rw-r--r--vendor/gitlab.com/golang-commonmark/linkify/charset.go51
1 files changed, 0 insertions, 51 deletions
diff --git a/vendor/gitlab.com/golang-commonmark/linkify/charset.go b/vendor/gitlab.com/golang-commonmark/linkify/charset.go
deleted file mode 100644
index 7ea3b625..00000000
--- a/vendor/gitlab.com/golang-commonmark/linkify/charset.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package linkify
-
-import (
- "unicode"
-
- "golang.org/x/text/unicode/rangetable"
-)
-
-var (
- unreserved = [256]bool{'-': true, '.': true, '_': true, '~': true}
- basicPunct = [256]bool{'.': true, ',': true, '?': true, '!': true, ';': true, ':': true}
- subdelims = [256]bool{'!': true, '$': true, '&': true, '\'': true, '(': true, ')': true,
- '*': true, '+': true, ',': true, ';': true, '=': true}
- emailcs = [256]bool{'a': true, 'b': true, 'c': true, 'd': true, 'e': true, 'f': true, 'g': true,
- 'h': true, 'i': true, 'j': true, 'k': true, 'l': true, 'm': true, 'n': true, 'o': true,
- 'p': true, 'q': true, 'r': true, 's': true, 't': true, 'u': true, 'v': true, 'w': true,
- 'x': true, 'y': true, 'z': true, 'A': true, 'B': true, 'C': true, 'D': true, 'E': true,
- 'F': true, 'G': true, 'H': true, 'I': true, 'J': true, 'K': true, 'L': true, 'M': true,
- 'N': true, 'O': true, 'P': true, 'Q': true, 'R': true, 'S': true, 'T': true, 'U': true,
- 'V': true, 'W': true, 'X': true, 'Y': true, 'Z': true, '0': true, '1': true, '2': true,
- '3': true, '4': true, '5': true, '6': true, '7': true, '8': true, '9': true, '!': true,
- '#': true, '$': true, '%': true, '&': true, '\'': true, '*': true, '+': true, '/': true,
- '=': true, '?': true, '^': true, '_': true, '`': true, '{': true, '|': true, '}': true,
- '~': true, '-': true}
- letterOrDigit = rangetable.Merge(unicode.Letter, unicode.Digit)
- punctSpaceCc = rangetable.Merge(unicode.Punct, unicode.Space, unicode.Cc)
-)
-
-func isAllowedInEmail(r rune) bool {
- return r < 0x7f && emailcs[r]
-}
-
-func isLetterOrDigit(r rune) bool {
- return unicode.Is(letterOrDigit, r)
-}
-
-func isPunctOrSpaceOrControl(r rune) bool {
- return r == '<' || r == '>' || r == '\uff5c' || unicode.Is(punctSpaceCc, r)
-}
-
-func isUnreserved(r rune) bool {
- return (r < 0x7f && unreserved[r]) || unicode.Is(letterOrDigit, r)
-}
-
-func isSubDelimiter(r rune) bool {
- return r < 0x7f && subdelims[r]
-}