Andrew Radev wrote:
> On the latest hg master (7.4.567), the head of the `HtmlIndent` function
> reads:
>
> " THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum.
> func! HtmlIndent()
> "{{{
> if prevnonblank(v:lnum - 1) <= 1
> " First non-blank line has no indent.
> return 0
> endif
>
> I believe that it should be `prevnonblank(v:lnum - 1) <= 0`.
> Otherwise, the tag on line 2 gets no indentation (the previous
> non-blank line can be an opening tag on line 1). This wouldn't be
> noticeable if the first line is a doctype or `<html>`, whose children
> don't get any indent anyway, but in this case it ends up being an
> issue:
>
> <div>
> <div></div>
> </div>
>
> I noticed that Bram is the last one to touch this area in hg commit
> 6032, "Overhauled HTML indent script.", which is why I'm writing here
> and not directly to Andy Wokula.
Yes, most people have a doctype in the first line, in which case this
mistake goes unnoticed. I'll fix it.
--
hundred-and-one symptoms of being an internet addict:
73. You give your dog used motherboards instead of bones
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.