thetooi / zen-coding

Automatically exported from code.google.com/p/zen-coding
0 stars 0 forks source link

HTML pair matcher fails when comments are present #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In HTML code like
<div>
    <!-- comment --><span></span>
</div>
place caret after <div> then run "Match pair" command. Selection will start 
from <div> and end right before closing </span> instead of </div>.

Original issue reported on code.google.com by GreLIm...@gmail.com on 5 Mar 2010 at 9:24

GoogleCodeExporter commented 9 years ago
Сам написал, сам нашёл. В html_matcher.js на 240-й 
строчке
https://github.com/sergeche/zen-coding/blob/master/javascript/html_matcher.js#L2
40
при нахождении, закрывающих комментарий, 
символов к индексу прибавляется 3 (ix += 
check_str.search('-->') + 3;) и после прохода тела цикла 
добавляется ещё единица, из-за чего не 
обрабатывается следующий за комментарием 
символ.

Original comment by GreLIm...@gmail.com on 8 Dec 2010 at 6:52

GoogleCodeExporter commented 9 years ago
fixed in v0.7

Original comment by serge....@gmail.com on 30 Jan 2011 at 1:22