mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 05:51:32 +01:00
[html] script end tag is not correctly indented. Fixes #16650
This commit is contained in:
@@ -41,6 +41,22 @@ export function startsWith(haystack: string, needle: string): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function repeat(value: string, count: number) {
|
||||
var s = '';
|
||||
while (count > 0) {
|
||||
if ((count & 1) === 1) {
|
||||
s += value;
|
||||
}
|
||||
value += value;
|
||||
count = count >>> 1;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
export function isWhitespaceOnly(str: string) {
|
||||
return /^\s*$/.test(str);
|
||||
}
|
||||
|
||||
|
||||
const CR = '\r'.charCodeAt(0);
|
||||
const NL = '\n'.charCodeAt(0);
|
||||
|
||||
Reference in New Issue
Block a user