Added Code to HtmlUtils to return info when in closing tag#3419
Added Code to HtmlUtils to return info when in closing tag#3419RaymondLim merged 5 commits intoadobe:masterfrom
Conversation
|
Definitely needs unit tests |
There was a problem hiding this comment.
I don't think we need this unless there is a specific use of "CLOSING_TAG" in any feature. Otherwise, you may introduce some unit test failures here. So I suggest that you keep the empty tag info.
|
@RaymondLim changes pushed. |
There was a problem hiding this comment.
You're adjusting the offset in the wrong direction. Consider this example: </|h2> where | is the cursor position. You will have offset equals to 2 and token string equals to "</h2" before your changes. Since you're stripping off "</" from the token string, the caller will get "h2" as the tag name and you should have offset set to zero, indicating the cursor is before the returned string.
There was a problem hiding this comment.
actually i misinterpreted the meaning of the offset, now it is clear to me.
|
Done second review. |
|
@RaymondLim fixes pushed. |
There was a problem hiding this comment.
Sorry, I should have caught this in the previous round of review. This comment is no longer correct. We're just handling closing tag here.
|
@RaymondLim fixes pushed. |
|
Looks good. Merging. |
Added Code to HtmlUtils to return info when in closing tag
Possible fix for #3407 and #1570.
@RaymondLim you may want to look at this.