mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Merge branch 'master' of https://github.com/kevinywlui/kitty
This commit is contained in:
commit
ff6d325341
2 changed files with 5 additions and 1 deletions
|
|
@ -174,7 +174,7 @@ var PostProcessorMap = sync.OnceValue(func() map[string]PostProcessorFunc {
|
|||
e -= len(url) - idx
|
||||
}
|
||||
}
|
||||
for e > 1 && is_punctuation(char_at(text, e)) { // remove trailing punctuation
|
||||
for e > 1 && is_punctuation(char_at(text, e-1)) { // remove trailing punctuation
|
||||
e--
|
||||
}
|
||||
// truncate url at closing bracket/quote
|
||||
|
|
|
|||
|
|
@ -67,6 +67,10 @@ func TestHintMarking(t *testing.T) {
|
|||
r(`<a href="`+u+`">moo`, u)
|
||||
r("\x1b[mhttp://test.me/1234\n\x1b[mx", "http://test.me/1234")
|
||||
r("\x1b[mhttp://test.me/12345\r\x1b[m6\n\x1b[mx", "http://test.me/123456")
|
||||
r("http://example.com,", "http://example.com")
|
||||
r("http://example.com.", "http://example.com")
|
||||
r("http://example.com!", "http://example.com")
|
||||
r("http://example.com?", "http://example.com")
|
||||
|
||||
opts.Type = "linenum"
|
||||
m := func(text, path string, line int) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue