Skip to content
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

findAndReplaceDOMText cannot handle zero-length matches on reviews with import/require #821

Closed
fregante opened this issue Feb 17, 2020 · 2 comments · Fixed by #837
Closed
Labels

Comments

@fregante
Copy link
Collaborator

Describe the bug
PR reviews that have review comments with require/import will fail

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/fregante/pet-names/pull/1/files
  2. See error in console
Error: "findAndReplaceDOMText cannot handle zero-length matches"
    prepMatch moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:54
    o moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:54
    search moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:54
    a moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:54
    i moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:54
    r moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:54
    C moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:68
    j moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:68
    j moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:68
    nn moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:225
    <anonymous> moz-extension://61d51579-8113-0c45-9f55-248589474b30/app.js:225
    li https://github.githubassets.com/assets/frameworks-4cbcc25c.js:120
    di https://github.githubassets.com/assets/frameworks-4cbcc25c.js:120
@stefanbuck
Copy link
Member

Thanks for reporting. This party case is quite tricky, but while working on this I've noticed that regular code snippets also broke linking see #829 However, the issue with code suggestion remains, but I'm on it.

@stefanbuck
Copy link
Member

I'm going to release a first fix for code review comments with code snippets (not to be confused with code suggestion). The raised issue still causes some headache and I wasn't able to find a solution yet. The DOM structure of code suggestions is similar to the blob views DOM which is causes a merge of the both.

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

Successfully merging a pull request may close this issue.

2 participants