mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 05:51:32 +01:00
HTML format selection formatting entire line issue. Fixes #25521
This commit is contained in:
@@ -57,9 +57,12 @@ export function isWhitespaceOnly(str: string) {
|
||||
return /^\s*$/.test(str);
|
||||
}
|
||||
|
||||
export function isEOL(content: string, offset: number) {
|
||||
return isNewlineCharacter(content.charCodeAt(offset));
|
||||
}
|
||||
|
||||
const CR = '\r'.charCodeAt(0);
|
||||
const NL = '\n'.charCodeAt(0);
|
||||
function isNewlineCharacter(charCode: number) {
|
||||
export function isNewlineCharacter(charCode: number) {
|
||||
return charCode === CR || charCode === NL;
|
||||
}
|
||||
Reference in New Issue
Block a user