This determines which characters are allowed to exceed the limitation (after wrapOn
value).
By default, this has been set to /\s/
to allow any white-space character.
new-line-character ('\n'
) will be ignored, anyway.
Note: This RegExp will be tested against only a single character (each time)!
Long lines don't break at any where the length is exceeded. But it occurs only on word-boundaries by default.
So this options has been set to /[^\w\xA0]/
to be broken on any non-word character (/^\w/ === /[^a-zA-Z0-9_]/
)
except a special white-space character named non-breakable space ('\xA0'
).
Note: This RegExp will be tested against only a single character (each time)!
This value will be added after each line-break ('\n'
) character that this tool adds to the text.
So it appears in the leading of each new line (not the already-present lines).
This determines the max-length that should be considered for tab-characters ('\t'
). Notice that the length of
each tab-character is depended on its location in its line. For example if this option is set to 4
, then the
length of '\tA'
will appear 5
and the length of 'A\t'
will appear 4
.
This is the most common option. It determines the maximum allowed length of each line. The words exceed this rule will go to the next line. There are some configurable options to say the program how does this work:
allowedExceedingCharacters
breakableCharacters
tabLength
continuationIndent
Generated using TypeDoc
Preferences to pass to the TextWrapper constructor to control its behavior. All choices are optional. See default values in DEF_WRAP_OPTIONS.