vscode-live-server
vscode-live-server copied to clipboard
Inject code to last candidate
Rather than injecting into the first match of "</body>
" , it will inject into the last found occurrence of it. This will avoid overwriting code following the tag. Also works for the head regex.
PR Type
What kind of change does this PR introduce?
Fix injection candidate regex
[x] Bugfix
[ ] Feature
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other: <!-- Please describe: -->
What is the current behavior?
matches the first occurrence of a tag and overrides code
Issue Number: N/A (there were multiple issues referring to this issue)
What is the new behavior?
matches the last occurrence of a tag
Does this PR introduce a breaking change?
[ ] Yes
[x] No
Other information
adjusting the head regex may not fix the issue, but the body fix will, and it is the most commonly used / reported issue
I'm facing an issue due to this. Is there any plan to merge this fix? For example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
"</body>"
</script>
</body>
</html>
Results in:
I'm facing an issue due to this. Is there any plan to merge this fix?
Highly doubt it. The extension hasn't been updated for over a year.