Fix invalid markdown text ranges (#9126)
second Range value is the end pos, not the length... 🙈
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
5a2d46c6cb
Коммит
a575411f15
@@ -86,9 +86,14 @@ func TestTextRanges(t *testing.T) {
|
||||
ExpectedValues: []string{"& test"},
|
||||
},
|
||||
"notcharref2": {
|
||||
Markdown: "&mattermost;",
|
||||
ExpectedRanges: []Range{{0, 12}},
|
||||
ExpectedValues: []string{"&mattermost;"},
|
||||
Markdown: "this is &mattermost;",
|
||||
ExpectedRanges: []Range{{0, 20}},
|
||||
ExpectedValues: []string{"this is &mattermost;"},
|
||||
},
|
||||
"standalone-ampersand": {
|
||||
Markdown: "Hello & World",
|
||||
ExpectedRanges: []Range{{0, 13}},
|
||||
ExpectedValues: []string{"Hello & World"},
|
||||
},
|
||||
} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user