lorenzos / ZenCodingNetBeansPlugin

Zen Coding plugin for NetBeans
233 stars 57 forks source link

Wrap with abbreviation doesn't take account of selection #13

Closed lingo closed 12 years ago

lingo commented 12 years ago

If text is selected, then the wrap method still looks at surrounding tags. If I understand the zencoding documents this should only happen when text isn't selected.

For instance in the document below, if I select the two lines "This will be a paragraph..." and choose to wrap with p*, then the two paragraph tags above are also wrapped. Shouldn't the selection prevent zencoding from seeking the surrounding tag (in this case div#Content)?

Example:


    <div id="Content">
        <p>Some info text here</p>
        <p>and another para</p>

        This will be a paragraph
        and this too
    </div>

Expected output

<div id="Content">
        <p>Some info text here</p>
        <p>and another para</p>

        <p>This will be a list item</p>
        <p>and this too</p>
    </div>

Actual output

<div id="Content">
        <p>
            <p>Some info text here</p>
        </p>
        <p>
            <p>and another para</p>
        </p>
        <p>This will be a list item</p>
        <p>and this too</p>
    </div>
lingo commented 12 years ago

I have no idea if this is an upstream issue.. let me know if it is, and I'll report it there. Cheers, - L

lorenzos commented 12 years ago

I cannot reproduce it, neither here (official plugin) nor on my NetBeans implementation.

See this screencast and tell me if you are doing it differently (note, the last two attempts are intentionally done wrong).

lorenzos commented 12 years ago

Closing for no reply in 7 months. Cannot reproduce the described behavior.