Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 1x 1x 3385x | // A regex to match text that only has space and CR
// We use real space char " " (\u0020) here but not "\s" since "\s" will also match " " (\u00A0) which is something we need to keep
const SPACE_TEXT_REGEX = /^[\r\n\t ]*$/;
/**
* @internal
* Check if the given string only has space, including line breaks.
* @param txt The string to check
*/
export function hasSpacesOnly(txt: string): boolean {
return SPACE_TEXT_REGEX.test(txt);
}
|