Hi
I do :TOhtml on file1 that is diffed against file2 and has a deleted line. If
'number' is set, the leading spaces in the deleted line are displayed as
in the HTML browser (  in the editor).
file1:
text
vim: nu
file2:
text
vim: nu
The following patch fixes it.
Index: runtime/syntax/2html.vim
===================================================================
*** runtime/syntax/2html.vim (revision 1112)
--- runtime/syntax/2html.vim (working copy)
***************
*** 111,116 ****
--- 111,121 ----
" Replace the reserved html characters
let formatted =
substitute(substitute(substitute(substitute(substitute(formatted, '&',
'\&', 'g'), '<', '\<', 'g'), '>', '\>', 'g'), '"', '\"', 'g'),
"\x0c", '<hr class="PAGE-BREAK">', 'g')
+ " Restore screwed up leading spaces in front of diff fillchars (with active
line numbers)
+ if a:style_name == "DiffDelete"
+ let formatted = substitute(formatted, '&nbsp;', '\ ', 'g')
+ endif
+
" Replace double spaces and leading spaces
if ' ' != s:HtmlSpace
let formatted = substitute(formatted, ' ', s:HtmlSpace . s:HtmlSpace,
'g')
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---