fix(tohtml): replace hex escape with digit escape (#27728)

This commit is contained in:
altermo 2024-03-04 12:08:23 +01:00 committed by GitHub
parent 3df1211ebc
commit a8131aee9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -906,7 +906,9 @@ local function styletable_listchars(state)
if listchars.nbsp then if listchars.nbsp then
for _, match in for _, match in
ipairs(vim.fn.matchbufline(state.bufnr, '\xe2\x80\xaf\\|\xa0', 1, '$') --[[@as (table[])]]) ipairs(
vim.fn.matchbufline(state.bufnr, '\226\128\175\\|\194\160', 1, '$') --[[@as (table[])]]
)
do do
style_line_insert_overlay_char( style_line_insert_overlay_char(
state.style[match.lnum], state.style[match.lnum],

View File

@ -315,7 +315,7 @@ describe(':TOhtml', function()
fn.setline(1, '\tfoo\t') fn.setline(1, '\tfoo\t')
fn.setline(2, ' foo foo ') fn.setline(2, ' foo foo ')
fn.setline(3, ' foo foo ') fn.setline(3, ' foo foo ')
fn.setline(4, 'foo\x2cfoo') fn.setline(4, 'foo\194\160 \226\128\175foo')
run_tohtml_and_assert(screen) run_tohtml_and_assert(screen)
exec('new|only') exec('new|only')
fn.setline(1, '\tfoo\t') fn.setline(1, '\tfoo\t')