paste-from-office/filters/space
Functions
normalizeSpacerunSpans( htmlDocument ) → voidinternalmodule:paste-from-office/filters/space~normalizeSpacerunSpansNormalizes spacing in special Word
spacerun spans(<span style='mso-spacerun:yes'>\s+</span>) by replacing all spaces with pairs. This prevents spaces from being removed during further DOM/View processing (see especially_processDomInlineNodes).Parameters
htmlDocument : DocumentNative
Documentobject in which spacing should be normalized.
Returns
void
normalizeSpacing( htmlString ) → stringinternalmodule:paste-from-office/filters/space~normalizeSpacingReplaces last space preceding elements closing tag with
. Such operation prevents spaces from being removed during further DOM/View processing (see especially_processDomInlineNodes). This method also takes into account Word specific<o:p></o:p>empty tags. Additionally multiline sequences of spaces and new lines between tags are removed (see #39 and #40).Parameters
htmlString : stringHTML string in which spacing should be normalized.
Returns
stringInput HTML with spaces normalized.