IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
351 | 351 | { |
352 | 352 | var skipBogus = false, |
353 | 353 | bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true ), |
354 | | nbspRegExp = /^[\t\r\n ]*(?: |\xa0)$/; |
| 354 | isBogus = CKEDITOR.dom.walker.bogus(); |
355 | 355 | |
356 | 356 | return function( node ) |
357 | 357 | { |
… |
… |
|
359 | 359 | if ( bookmarkEvaluator( node ) ) |
360 | 360 | return true; |
361 | 361 | |
362 | | if ( node.type == CKEDITOR.NODE_TEXT ) |
| 362 | // Skip the bogus node at the end of block. |
| 363 | if ( isBogus( node ) && |
| 364 | ( node.type == CKEDITOR.NODE_TEXT || !isStart ) && |
| 365 | !skipBogus ) |
363 | 366 | { |
364 | | // Skip the block filler NBSP. |
365 | | if ( CKEDITOR.env.ie && |
366 | | nbspRegExp.test( node.getText() ) && |
367 | | !skipBogus && |
368 | | !( isStart && node.getNext() ) ) |
369 | | { |
370 | | skipBogus = true; |
371 | | } |
372 | | // If there's any visible text, then we're not at the start. |
373 | | else if ( node.hasAscendant( 'pre' ) || CKEDITOR.tools.trim( node.getText() ).length ) |
374 | | return false; |
375 | | } |
376 | | else if ( node.type == CKEDITOR.NODE_ELEMENT ) |
377 | | { |
378 | | // If there are non-empty inline elements (e.g. <img />), then we're not |
379 | | // at the start. |
380 | | if ( !inlineChildReqElements[ node.getName() ] ) |
381 | | { |
382 | | // Skip the padding block br. |
383 | | if ( !CKEDITOR.env.ie && |
384 | | node.is( 'br' ) && |
385 | | !skipBogus && |
386 | | !( isStart && node.getNext() ) ) |
387 | | { |
388 | | skipBogus = true; |
389 | | } |
390 | | else |
391 | | return false; |
392 | | } |
393 | | } |
| 367 | skipBogus = true; |
| 368 | return true; |
| 369 | } |
| 370 | |
| 371 | // If there's any visible text, then we're not at the start. |
| 372 | if ( node.type == CKEDITOR.NODE_TEXT && |
| 373 | ( node.hasAscendant( 'pre' ) || |
| 374 | CKEDITOR.tools.trim( node.getText() ).length ) ) |
| 375 | return false; |
| 376 | |
| 377 | // If there are non-empty inline elements (e.g. <img />), then we're not |
| 378 | // at the start. |
| 379 | if ( node.type == CKEDITOR.NODE_ELEMENT && !inlineChildReqElements[ node.getName() ] ) |
| 380 | return false; |
| 381 | |
394 | 382 | return true; |
395 | 383 | }; |
396 | 384 | } |
… |
… |
|
1834 | 1822 | var startContainer = this.startContainer, |
1835 | 1823 | startOffset = this.startOffset; |
1836 | 1824 | |
1837 | | // If the starting node is a text node, and non-empty before the offset, |
1838 | | // then we're surely not at the start of block. |
1839 | | if ( startOffset && startContainer.type == CKEDITOR.NODE_TEXT ) |
1840 | | { |
1841 | | var textBefore = CKEDITOR.tools.ltrim( startContainer.substring( 0, startOffset ) ); |
1842 | | if ( textBefore.length ) |
1843 | | return false; |
1844 | | } |
1845 | | |
1846 | 1825 | // We need to grab the block element holding the start boundary, so |
1847 | 1826 | // let's use an element path for it. |
1848 | 1827 | var path = new CKEDITOR.dom.elementPath( this.startContainer ); |
… |
… |
|
1860 | 1839 | |
1861 | 1840 | checkEndOfBlock : function() |
1862 | 1841 | { |
1863 | | var endContainer = this.endContainer, |
1864 | | endOffset = this.endOffset; |
1865 | | |
1866 | | // If the ending node is a text node, and non-empty after the offset, |
1867 | | // then we're surely not at the end of block. |
1868 | | if ( endContainer.type == CKEDITOR.NODE_TEXT ) |
1869 | | { |
1870 | | var textAfter = CKEDITOR.tools.rtrim( endContainer.substring( endOffset ) ); |
1871 | | if ( textAfter.length ) |
1872 | | return false; |
1873 | | } |
1874 | | |
1875 | 1842 | // We need to grab the block element holding the start boundary, so |
1876 | 1843 | // let's use an element path for it. |
1877 | 1844 | var path = new CKEDITOR.dom.elementPath( this.endContainer ); |