mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
fix(man): filter OSC 8 hyperlink markup #29171
Problem: `man cmake` shows "8;;https://cmake.orghttps://cmake.org8;;" Solution: Remove noise so that it shows as "https://cmake.org". See also: https://en.wikipedia.org/wiki/ANSI_escape_code#OSC
This commit is contained in:
@@ -117,6 +117,29 @@ describe(':Man', function()
|
||||
]])
|
||||
end)
|
||||
|
||||
it('clears OSC 8 hyperlink markup from text', function()
|
||||
feed(
|
||||
[[
|
||||
ithis <C-v><ESC>]8;;http://example.com<C-v><ESC>\Link Title<C-v><ESC>]8;;<C-v><ESC>\<ESC>]]
|
||||
)
|
||||
|
||||
screen:expect {
|
||||
grid = [=[
|
||||
this {c:^[}]8;;http://example.com{c:^[}\Link Title{c:^[}]8;;{c:^[}^\ |
|
||||
{eob:~ }|*3
|
||||
|
|
||||
]=],
|
||||
}
|
||||
|
||||
exec_lua [[require'man'.init_pager()]]
|
||||
|
||||
screen:expect([[
|
||||
^this Link Title |
|
||||
{eob:~ }|*3
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('highlights multibyte text', function()
|
||||
feed(
|
||||
[[
|
||||
|
||||
Reference in New Issue
Block a user