diff options
Diffstat (limited to 'extensions/markdown-language-features/src/util/string.ts')
-rw-r--r-- | extensions/markdown-language-features/src/util/string.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/extensions/markdown-language-features/src/util/string.ts b/extensions/markdown-language-features/src/util/string.ts new file mode 100644 index 00000000000..dd9733e9ffd --- /dev/null +++ b/extensions/markdown-language-features/src/util/string.ts @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +export function isEmptyOrWhitespace(str: string): boolean { + return /^\s*$/.test(str); +} |