-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(overlay): Add click to go to editor for audits #9016
Conversation
🦋 Changeset detectedLatest commit: 3962a6e The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
⚖️ Bundle Size CheckLatest commit: 3962a6e
|
@@ -24,7 +24,7 @@ const first = defineMiddleware(async (context, next) => { | |||
const response = await next(); | |||
const newResponse = response.clone(); | |||
const /** @type {string} */ html = await newResponse.text(); | |||
const newhtml = html.replace('<h1>testing</h1>', '<h1>it works</h1>'); | |||
const newhtml = html.replace('testing', 'it works'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this is a bit awkward. But since we now add attributes, those kind of naive replacements don't work in dev.
In my humble, informed, opinion, you shouldn't rely on string replaces like this anyway, because whitespaces, minification etc etc could ruin it anyway. Typically, I'd recommend people to use a real tool for this, like https://github.com/cloudflare/lol-html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, such shade 🌨
Co-authored-by: Bjorn Lu <[email protected]>
* feat(overlay): Add click to go to editor for audits * chore: changeset * chore: update compiler dep * fix: tests * Update packages/astro/src/core/compile/compile.ts Co-authored-by: Bjorn Lu <[email protected]> * Update packages/astro/src/core/compile/compile.ts --------- Co-authored-by: Bjorn Lu <[email protected]>
Changes
Much like you can go to the editor for xray, now you can for audits.
Testing
Will be tested in a separate PR
Docs
N/A