Markus Heidelberg, 18.07.2008:
> 
> Bram Moolenaar, 17.07.2008:
> > 
> > Hmm, that works around the problem after it has happened.  Would be
> > better to fix it where it is caused.  So the   should not be
> > escaped.  Looks like s:LeadingSpace is misused around line 308, needs to
> > more digging to figure it out.  Can you look into that?
> 
> Yes, I know. I wanted to add that this is not the best solution, but I forgot
> to.
> The problem is that in s:HtmlFormat() the & is converted to &. I tried
> adding s:LeadingSpace from line 308 (set to &bnsp;) after this function call
> on line 324 but then the &nbsp; is in front of the <span> instead of inside
> this tag of course.
> So how can we bypass this? Splitting s:HtmlFormat() in two functions, one for
> conversion of the HTML characters, the other for generation of the HTML tags?
> Then we could probably add s:LeadingSpace between these two function calls.

Still after the problem has already happened, but at least it is outside of
s:HtmlFormat(), staying in the diff filler part. Hmm, why didn't the first
patch look like this?


*** 2html.vim.orig      2008-07-17 23:36:24.000000000 +0200
--- 2html.vim   2008-07-18 00:20:55.000000000 +0200
***************
*** 321,326 ****
--- 321,330 ----
        endif
  
        let s:new = s:HtmlFormat(s:new, "DiffDelete")
+ 
+       " Restore screwed up leading spaces in front of diff fillchars (with 
active line numbers)
+       let s:new = substitute(s:new, '&amp;nbsp;', '\&nbsp;', 'g')
+ 
        exe s:newwin . "wincmd w"
        exe "normal! a" . s:new . s:HtmlEndline . "\n\e"
        exe s:orgwin . "wincmd w"


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui