Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.4.3
[ckeditor.git]
/
_source
/
plugins
/
pastefromword
/
filter
/
default.js
diff --git
a/_source/plugins/pastefromword/filter/default.js
b/_source/plugins/pastefromword/filter/default.js
index
61ceaf8
..
13ff5bc
100644
(file)
--- a/
_source/plugins/pastefromword/filter/default.js
+++ b/
_source/plugins/pastefromword/filter/default.js
@@
-118,8
+118,11
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
return result;
\r
};
\r
\r
return result;
\r
};
\r
\r
- var cssLengthRelativeUnit = /^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i;
\r
+ var cssLengthRelativeUnit = /^([.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i;
\r
var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/; // e.g. 0px 0pt 0px
\r
var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/; // e.g. 0px 0pt 0px
\r
+ var romanLiternalPattern = '^m{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})$',
\r
+ lowerRomanLiteralRegex = new RegExp( romanLiternalPattern ),
\r
+ upperRomanLiteralRegex = new RegExp( romanLiternalPattern.toUpperCase() );
\r
\r
var listBaseIndent = 0,
\r
previousListItemMargin;
\r
\r
var listBaseIndent = 0,
\r
previousListItemMargin;
\r
@@
-144,8
+147,10
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
{
\r
if ( !isNaN( bulletStyle[ 1 ] ) )
\r
bulletStyle = 'decimal';
\r
{
\r
if ( !isNaN( bulletStyle[ 1 ] ) )
\r
bulletStyle = 'decimal';
\r
- // No way to distinguish between Roman numerals and Alphas,
\r
- // detect them as a whole.
\r
+ else if ( lowerRomanLiteralRegex.test( bulletStyle[ 1 ] ) )
\r
+ bulletStyle = 'lower-roman';
\r
+ else if ( upperRomanLiteralRegex.test( bulletStyle[ 1 ] ) )
\r
+ bulletStyle = 'upper-roman';
\r
else if ( /^[a-z]+$/.test( bulletStyle[ 1 ] ) )
\r
bulletStyle = 'lower-alpha';
\r
else if ( /^[A-Z]+$/.test( bulletStyle[ 1 ] ) )
\r
else if ( /^[a-z]+$/.test( bulletStyle[ 1 ] ) )
\r
bulletStyle = 'lower-alpha';
\r
else if ( /^[A-Z]+$/.test( bulletStyle[ 1 ] ) )
\r
@@
-219,7
+224,7
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
{
\r
// Be able to deal with component/short-hand form style.
\r
var values = margin.split( ' ' );
\r
{
\r
// Be able to deal with component/short-hand form style.
\r
var values = margin.split( ' ' );
\r
- margin = values[ 3 ] || values[ 1 ] || values [ 0 ];
\r
+ margin = CKEDITOR.plugins.pastefromword.utils.convertToPx( values[ 3 ] || values[ 1 ] || values [ 0 ] );
\r
margin = parseInt( margin, 10 );
\r
\r
// Figure out the indent unit by looking at the first increament.
\r
margin = parseInt( margin, 10 );
\r
\r
// Figure out the indent unit by looking at the first increament.
\r