X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fpastefromword%2Ffilter%2Fdefault.js;h=e29d1c5e22dc38d3ef8b8fa4e268a83f41ff8759;hp=61ceaf8e2906488c2e4647e39f6fb7b6c99829ea;hb=039a051ccf3901311661022a30afd60fc38130c9;hpb=c9fdde67e6384bd5a66adc2b3bba5c4ce9db56c7 diff --git a/_source/plugins/pastefromword/filter/default.js b/_source/plugins/pastefromword/filter/default.js index 61ceaf8..e29d1c5 100644 --- a/_source/plugins/pastefromword/filter/default.js +++ b/_source/plugins/pastefromword/filter/default.js @@ -118,7 +118,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license return result; }; - 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; + 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; var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/; // e.g. 0px 0pt 0px var listBaseIndent = 0, @@ -219,7 +219,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { // Be able to deal with component/short-hand form style. var values = margin.split( ' ' ); - margin = values[ 3 ] || values[ 1 ] || values [ 0 ]; + margin = CKEDITOR.plugins.pastefromword.utils.convertToPx( values[ 3 ] || values[ 1 ] || values [ 0 ] ); margin = parseInt( margin, 10 ); // Figure out the indent unit by looking at the first increament.