fix problems with html style comments in embedded code#160981
Conversation
aeschli
left a comment
There was a problem hiding this comment.
Can you add a test case to
?| if (fileName === currentTextDocument.uri) { | ||
| text = currentTextDocument.getText(); | ||
| if (fileName.endsWith('html')) { | ||
| text = currentTextDocument.getText().replace(`<!--`, `/*`).replace(`-->`, `*/`); |
There was a problem hiding this comment.
The replacement should have the same amount of characters, so that all offsets stay the same.
-> /* instead of /*
There was a problem hiding this comment.
Can you add a test case to
?
sure working on it
There was a problem hiding this comment.
Thanks, pleaese add also one with some JavaScript code before and after it.
There was a problem hiding this comment.
check the new commits, will that work?
add same amount of characters, in the replacements so that all offsets stays the same
|
PTAL! |
more testcases with js code before and after the comments
|
any progress on this? |
|
@w1redch4d Looks like the CLA bot is still not happy, can you add a comment with to get the PR merged? |
|
@aeschli what if i dont work for any company?, im currently a student |
|
@w1redch4d If you work just on your behalf, then you can skip the company part and accept the Contributor License Agreement by replying |
@microsoft-github-policy-service agree |
) * fix problems with html style comments in embedded code * add spacings to the replaced characters add same amount of characters, in the replacements so that all offsets stays the same * revert javascriptMode.ts * add replace characters in embeddedSupport.ts instead * added few more tests with javascript more testcases with js code before and after the comments * polish Co-authored-by: UwUeeb <[email protected]> Co-authored-by: Martin Aeschlimann <[email protected]>
Fixes #47448