Skip to content

Conversation

sonukapoor
Copy link
Contributor

@sonukapoor sonukapoor commented Aug 3, 2020

The Chrome debugger is not able to render the syntax properly when the
code contains backticks. This is a known issue in Chrome and they have an
open issue for that.
This commit adds the work-around to use double backslash with one
backtick \\` at the end of the line.

This can be reproduced by running the following command.

yarn bazel test //packages/forms/test --config=debug

When opening the chrome debugger tools, you should see the correct code highlighting syntax.

Before

before

After

correct-display

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from alxhub August 3, 2020 16:52
@sonukapoor sonukapoor added the area: service-worker Issues related to the @angular/service-worker package label Aug 3, 2020
@ngbot ngbot bot added this to the needsTriage milestone Aug 3, 2020
@gkalpak
Copy link
Member

gkalpak commented Aug 6, 2020

Interesting! Where exactly are you seeing this? AFAICT, the ngsw-worker.js script has no sourcemaps 😕

The Chrome debugger is not able to render the syntax properly when the
code contains backticks. This is a known issue in Chrome and they have an
open [issue](https://bugs.chromium.org/p/chromium/issues/detail?id=659515) for that.
This commit adds the work-around to use double backslash with one
backtick ``\\` `` at the end of the line.

This can be reproduced by running the following command:

`yarn bazel test //packages/forms/test --config=debug`

When opening the chrome debugger tools, you should see the correct
code highlighting syntax.
@sonukapoor sonukapoor force-pushed the fix-chrome-debugger-syntax-highlighter branch from c13c5b9 to b1f791c Compare August 6, 2020 18:43
@sonukapoor
Copy link
Contributor Author

Interesting! Where exactly are you seeing this? AFAICT, the ngsw-worker.js script has no sourcemaps 😕

As discussed, I have updated the commit message with more information on where this occurs.

@gkalpak gkalpak added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release refactoring Issue that involves refactoring or code-cleanup labels Aug 6, 2020
@gkalpak gkalpak removed the request for review from alxhub August 6, 2020 20:19
AndrewKushnir pushed a commit that referenced this pull request Aug 6, 2020
The Chrome debugger is not able to render the syntax properly when the
code contains backticks. This is a known issue in Chrome and they have an
open [issue](https://bugs.chromium.org/p/chromium/issues/detail?id=659515) for that.
This commit adds the work-around to use double backslash with one
backtick ``\\` `` at the end of the line.

This can be reproduced by running the following command:

`yarn bazel test //packages/forms/test --config=debug`

When opening the chrome debugger tools, you should see the correct
code highlighting syntax.

PR Close #38332
profanis pushed a commit to profanis/angular that referenced this pull request Sep 5, 2020
…lar#38332)

The Chrome debugger is not able to render the syntax properly when the
code contains backticks. This is a known issue in Chrome and they have an
open [issue](https://bugs.chromium.org/p/chromium/issues/detail?id=659515) for that.
This commit adds the work-around to use double backslash with one
backtick ``\\` `` at the end of the line.

This can be reproduced by running the following command:

`yarn bazel test //packages/forms/test --config=debug`

When opening the chrome debugger tools, you should see the correct
code highlighting syntax.

PR Close angular#38332
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2020
@sonukapoor sonukapoor deleted the fix-chrome-debugger-syntax-highlighter branch September 8, 2020 18:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: service-worker Issues related to the @angular/service-worker package cla: yes refactoring Issue that involves refactoring or code-cleanup target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants