MM-55267 Add ability for server-side Markdown code to understand emojis (#25332)
* MM-55267 Add ability for server-side Markdown code to understand emojis * Remove unused regex
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
448d442a0b
Коммит
9397970644
@@ -55,6 +55,15 @@ func isAlphanumericByte(c byte) bool {
|
||||
return isAlphanumeric(rune(c))
|
||||
}
|
||||
|
||||
// isWord returns true if c matches the \w regexp character class
|
||||
func isWord(c rune) bool {
|
||||
return isAlphanumeric(c) || c == '_'
|
||||
}
|
||||
|
||||
func isWordByte(c byte) bool {
|
||||
return isWord(rune(c))
|
||||
}
|
||||
|
||||
func nextNonWhitespace(markdown string, position int) int {
|
||||
for offset, c := range []byte(markdown[position:]) {
|
||||
if !isWhitespaceByte(c) {
|
||||
|
||||
Ссылка в новой задаче
Block a user