huilin1990 / zen-coding

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

Wrap around parsing bug #269

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Copy this snippet:

<ul>
 <li>$2,200</li>
 <li>$1,700</li>
 <li>$0</li>
 <li>$900</li>
</ul>

2. Use the "Wrap with abbreviation" function.
3. Wrap the snippet with a div or any kind of container.

Notice that the $x expression has been replaced with nothing!

Using version: 0.7 (haven't tested previous versions)

This is a pretty serious issue consideration there is no warning to the user 
about the replaced text...

Original issue reported on code.google.com by mgibeau....@gmail.com on 11 May 2011 at 4:04

GoogleCodeExporter commented 8 years ago
will fix in next release

Original comment by serge....@gmail.com on 12 May 2011 at 9:36

GoogleCodeExporter commented 8 years ago
This works as expected for me in Notepad++ using Zen Coding Python :/

Wrapping it with ".test" results in:

<div class="test">
 <ul>
  <li>$2,200</li>
  <li>$1,700</li>
  <li>$0</li>
  <li>$900</li>
 </ul>
</div>

However, if I have this code:
one
two
three

And use this bit of zen on it
tr*>(td{$#})+(td)

I get this:
<tr>
    <td>one</td>
    <td></td>
</tr>
<tr>
    <td>two</td>
    <td></td>
</tr>
<tr>
    <td>three</td>
    <td></td>
</tr>

But if I use this zen:
tr*>(td>span{$#})+(td)

Sublime Text 2 gives me this:
<tr>
    <td><span>#</span></td>
    <td>one</td>
</tr>
<tr>
    <td><span>#</span></td>
    <td>two</td>
</tr>
<tr>
    <td><span>#</span></td>
    <td>three</td>
</tr>

And Notepad++ with Zen Coding Python gives me this:
<tr>
    <td><span>1#</span></td>
    <td>one</td>
</tr>
<tr>
    <td><span>2#</span></td>
    <td>two</td>
</tr>
<tr>
    <td><span>3#</span></td>
    <td>three</td>
</tr>

Just so it's clear, I'm expecting this:
<tr>
    <td><span>one</span></td>
    <td></td>
</tr>
<tr>
    <td><span>two</span></td>
    <td></td>
</tr>
<tr>
    <td><span>three</span></td>
    <td></td>
</tr>

Original comment by lukescam...@gmail.com on 3 Aug 2011 at 4:43

GoogleCodeExporter commented 8 years ago
In Komodo 6.1, wrapping with "tr*>(td>span{$#})+(td)" returns the expected 
result.

Original comment by max...@gmail.com on 3 Aug 2011 at 5:49

GoogleCodeExporter commented 8 years ago
Issue 294 has been merged into this issue.

Original comment by GreLIm...@gmail.com on 6 Oct 2011 at 3:45

GoogleCodeExporter commented 8 years ago
Issue 275 has been merged into this issue.

Original comment by serge....@gmail.com on 25 Jun 2012 at 8:38

GoogleCodeExporter commented 8 years ago
Fixed, will be available in the next release

Original comment by serge....@gmail.com on 4 Jul 2012 at 9:32

GoogleCodeExporter commented 8 years ago

Original comment by serge....@gmail.com on 4 Jul 2012 at 9:32