Changeset 44649
- Timestamp:
- 01/18/2019 04:32:46 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/editor/base.js
r43347 r44649 189 189 190 190 /** 191 * Checks if a cursor is inside an HTML tag .191 * Checks if a cursor is inside an HTML tag or comment. 192 192 * 193 193 * In order to prevent breaking HTML tags when selecting text, the cursor … … 212 212 // find what the tag is 213 213 var tagContent = content.substr( lastLtPos ), 214 tagMatch = tagContent.match( /<\s*(\/)?(\w+ )/ );214 tagMatch = tagContent.match( /<\s*(\/)?(\w+|\!-{2}.*-{2})/ ); 215 215 216 216 if ( ! tagMatch ) { … … 383 383 384 384 /** 385 * Gets adjusted selection cursor positions according to HTML tags /shortcodes385 * Gets adjusted selection cursor positions according to HTML tags, comments, and shortcodes. 386 386 * 387 387 * Shortcodes and HTML codes are a bit of a special case when selecting, since they may render
Note: See TracChangeset
for help on using the changeset viewer.