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
@@ -101,6 +101,12 @@ func (i *Autolink) Destination() string {
|
||||
return destination
|
||||
}
|
||||
|
||||
type Emoji struct {
|
||||
inlineBase
|
||||
|
||||
Name string
|
||||
}
|
||||
|
||||
type delimiterType int
|
||||
|
||||
const (
|
||||
@@ -575,12 +581,24 @@ func (p *inlineParser) Parse() []Inline {
|
||||
p.parseLinkOrImageDelimiter()
|
||||
case ']':
|
||||
p.lookForLinkOrImage()
|
||||
case 'w', 'W', ':':
|
||||
case 'w', 'W':
|
||||
matched := p.parseAutolink(c)
|
||||
|
||||
if !matched {
|
||||
p.parseText()
|
||||
}
|
||||
case ':':
|
||||
matched := p.parseAutolink(c)
|
||||
if matched {
|
||||
continue
|
||||
}
|
||||
|
||||
matched = p.parseEmoji()
|
||||
if matched {
|
||||
continue
|
||||
}
|
||||
|
||||
p.parseText()
|
||||
default:
|
||||
p.parseText()
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user