Wrap abbreviation removes content that needs to be wrapped #309

Closed
keeperhood opened this Issue Apr 2, 2013 · 12 comments

Projects

None yet

2 participants

@keeperhood

Hi,

I'm experiencing this issue when trying to wrap some tags with abbreviation. Sometimes it happens sometimes it doesn't. When i press ctrl+alt+enter while some html tags are selected, it doesn't show me the newly wrapped content as it should. I didn't have this problem when the plugin was named zen coding. I hope this screenshot clears what is going on here. I've also tried with Shift+Ctrl+G and same issue occurs.

bug

@keeperhood

If i press enter when the "Enter abbervation prompts" It removes the selection and just acts as if i pressed enter over a text selection.

@sergeche
Owner

Check ST console for errors. Also, make sure you have the latest version of Emmet.

@keeperhood

Console doesn't seem to have any errors and the version in package metadata says "2013.04.01.09.41.50"

@sergeche
Owner

What’s your OS?

@keeperhood

I'm on Win 7 64-bit
I'm unsure but i think i had the same issue on Linux.

@keeperhood

These are the installed packages i have in ST2
installed-packages

@sergeche
Owner

Dos this issue still exists? If so, please send me example file where error occurs since I’m unable to reproduce it.

@keeperhood

Unfortunately it's still not functional. Sometimes it wraps sometimes it doesn't, but more often it doesn't. Are there any more details that I could provide?

@keeperhood

http://pastebin.com/5FYhq0a4
Here is one of the example where it doesn't work. It's a PHP file, I've tried appying a plain HTML syntax via ctrl+p syntax html, but there was no difference

@sergeche
Owner

OK, I found the problem: it were single quotes in attribute values. Emmet was unable to correctly parse these definitions.

I’ve pushed update, it should work fine now.

@keeperhood

Great, seems to be working now, I've tested on the same file. However a strange wrapping occurs in this particular markup:

                   <ul class='dropdown-menu'>
                        <li>
                            <a href="#">Settings</a>
                            <div class='separator'></div>
                        </li>
                        <li><a href="#">Logout</a></li>
                    </ul>

Turns into:

                     <div>
                         <ul class='dropdown-menu'>
                            <li>
                                <a href="#">Settings</a>
                                <div class='separator'></div>
                            </li>
                            <li><a href="#">Logout</a></li>
                                             </ul> <!--should align with it's opening tag -->
                     </div>

The <ul> closing tag doesn't align properly. It's in the same _header.php example I've shared with pastebin. Maybe another ticket should be opened for this or am I doing something wrong?

@sergeche
Owner

@keeperhood check out v1.1 branch, this issue looks solved

@sergeche sergeche closed this Dec 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment