expand Range To Surrounding Word
Type: Function
Returns a copy of the given range. If the given range is collapsed and in the middle of a word, the copy will be expanded to surround the complete word. If the given range was not collapsed or bordered on whitespace, the returned range will be the same as the input (but still a copy).
Refer to baseFlowUtils for more information on how to import and use this function.
Arguments
range
(Required)
Type: BlueprintRange
The input range
blueprint
(Required)
Type: Blueprint
The blueprint in which to consider the range
format
(Required)
Type: Format
The format
allow
Word Edge (Optional)
Type: Boolean
True if positions on word edges are allowed
Returns
Type: BlueprintRange
The resulting range