Skip to content

Debug ID: Define how to extract //# debugId=... comment #202

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

Open
lforst opened this issue Apr 18, 2025 · 1 comment
Open

Debug ID: Define how to extract //# debugId=... comment #202

lforst opened this issue Apr 18, 2025 · 1 comment

Comments

@lforst
Copy link
Member

lforst commented Apr 18, 2025

Similar to how we defined an algorithm to extract sourceMappingURL comments in #94 we should define an algorithm to extract the debugId= comment.

  • The same algorithm as for sourceMappingURL comments should likely be applied for debugId comments
  • Should we define a separate abstract operation in the spec?
  • Should adjust the existing algorithm to extract a "pattern" that is passed in? (pattern being either debugId or sourceMappingURL)
  • Should we be more specific with regard to //@ since we don't carry historical debt? i.e. dissallow it for debugId comments?
  • Should we define an algorithm for CSS too?
  • We should add tests. Do we already have tests for sourceMappingURL?
@szuend
Copy link
Collaborator

szuend commented Apr 22, 2025

We probably want a shared JavaScriptExtractMagicComment and CSSExtractMagicComment abstract operation. It can be parameterized so callers can specify whether a particular magic comment supports the legacy //@. Then we could disallow it for debugId.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants