mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
[html] Sytax Highlighting is way off with new line after event handler (#162319)
This commit is contained in:
committed by
GitHub
parent
c4359c2dab
commit
320f338681
@@ -196,9 +196,9 @@ function getSuffix(c: EmbeddedRegion) {
|
||||
}
|
||||
|
||||
function substituteWithWhitespace(result: string, start: number, end: number, oldContent: string, before: string, after: string) {
|
||||
let accumulatedWS = 0;
|
||||
result += before;
|
||||
for (let i = start + before.length; i < end; i++) {
|
||||
let accumulatedWS = -before.length; // start with a negative value to account for the before string
|
||||
for (let i = start; i < end; i++) {
|
||||
const ch = oldContent[i];
|
||||
if (ch === '\n' || ch === '\r') {
|
||||
// only write new lines, skip the whitespace
|
||||
|
||||
Reference in New Issue
Block a user