0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

Merge remote-tracking branch 'refs/remotes/neilj/master' into Path-contains-format-values

# Conflicts:
#	build/squire-raw.js
#	build/squire.js
#	source/Node.js
This commit is contained in:
Andy Kauffman 2016-07-07 09:54:41 -04:00
commit daec81d03f
2 changed files with 14 additions and 8 deletions

View file

@ -289,15 +289,18 @@ function getPath ( node, root ) {
if ( dir = node.dir ) { if ( dir = node.dir ) {
path += '[dir=' + dir + ']'; path += '[dir=' + dir + ']';
} }
if( classNames ) { if ( classNames ) {
if ( indexOf.call( classNames, HIGHLIGHT_CLASS ) > -1 ) { if ( indexOf.call( classNames, HIGHLIGHT_CLASS ) > -1 ) {
path += '[backgroundColor=' + node.style.backgroundColor.replace(/ /g,'') + ']'; path += '[backgroundColor=' +
node.style.backgroundColor.replace( / /g,'' ) + ']';
} }
if ( indexOf.call( classNames, COLOUR_CLASS ) > -1 ) { if ( indexOf.call( classNames, COLOUR_CLASS ) > -1 ) {
path += '[color=' + node.style.color.replace(/ /g,'') + ']'; path += '[color=' +
node.style.color.replace( / /g,'' ) + ']';
} }
if ( indexOf.call( classNames, FONT_FAMILY_CLASS ) > -1 ) { if ( indexOf.call( classNames, FONT_FAMILY_CLASS ) > -1 ) {
path += '[fontFamily=' + node.style.fontFamily.replace(/ /g,'') + ']'; path += '[fontFamily=' +
node.style.fontFamily.replace( / /g,'' ) + ']';
} }
if ( indexOf.call( classNames, FONT_SIZE_CLASS ) > -1 ) { if ( indexOf.call( classNames, FONT_SIZE_CLASS ) > -1 ) {
path += '[fontSize=' + node.style.fontSize + ']'; path += '[fontSize=' + node.style.fontSize + ']';

View file

@ -113,15 +113,18 @@ function getPath ( node, root ) {
if ( dir = node.dir ) { if ( dir = node.dir ) {
path += '[dir=' + dir + ']'; path += '[dir=' + dir + ']';
} }
if( classNames ) { if ( classNames ) {
if ( indexOf.call( classNames, HIGHLIGHT_CLASS ) > -1 ) { if ( indexOf.call( classNames, HIGHLIGHT_CLASS ) > -1 ) {
path += '[backgroundColor=' + node.style.backgroundColor.replace(/ /g,'') + ']'; path += '[backgroundColor=' +
node.style.backgroundColor.replace( / /g,'' ) + ']';
} }
if ( indexOf.call( classNames, COLOUR_CLASS ) > -1 ) { if ( indexOf.call( classNames, COLOUR_CLASS ) > -1 ) {
path += '[color=' + node.style.color.replace(/ /g,'') + ']'; path += '[color=' +
node.style.color.replace( / /g,'' ) + ']';
} }
if ( indexOf.call( classNames, FONT_FAMILY_CLASS ) > -1 ) { if ( indexOf.call( classNames, FONT_FAMILY_CLASS ) > -1 ) {
path += '[fontFamily=' + node.style.fontFamily.replace(/ /g,'') + ']'; path += '[fontFamily=' +
node.style.fontFamily.replace( / /g,'' ) + ']';
} }
if ( indexOf.call( classNames, FONT_SIZE_CLASS ) > -1 ) { if ( indexOf.call( classNames, FONT_SIZE_CLASS ) > -1 ) {
path += '[fontSize=' + node.style.fontSize + ']'; path += '[fontSize=' + node.style.fontSize + ']';