0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 15:23:29 -05:00

Stop treating a non-breaking space as white-space.

Its effect is that of a normal character in HTML, that just happens to render
as a space.
This commit is contained in:
Neil Jenkins 2013-11-04 18:21:57 +11:00
parent 0b3df54b6e
commit 08cc8172a8
3 changed files with 5 additions and 3 deletions

View file

@ -45,7 +45,8 @@ var hasBuggySplit = ( function () {
return div.childNodes.length !== 2; return div.childNodes.length !== 2;
}() ); }() );
var notWS = /\S/; // Use [^ \t\r\n] instead of \S so that nbsp does not count as white-space
var notWS = /[^ \t\r\n]/;
var indexOf = Array.prototype.indexOf; var indexOf = Array.prototype.indexOf;
/*global FILTER_ACCEPT */ /*global FILTER_ACCEPT */

File diff suppressed because one or more lines are too long

View file

@ -40,6 +40,7 @@ var hasBuggySplit = ( function () {
return div.childNodes.length !== 2; return div.childNodes.length !== 2;
}() ); }() );
var notWS = /\S/; // Use [^ \t\r\n] instead of \S so that nbsp does not count as white-space
var notWS = /[^ \t\r\n]/;
var indexOf = Array.prototype.indexOf; var indexOf = Array.prototype.indexOf;