Fix GitHub snippet resolution
Created by: lguychard
Fixes #771 (closed) Fixes #3105 (closed) Fixes #3110 (closed)
Deprecates commentSnippetCodeViewResolver
, which:
- Matched entire comments, even though they may have contained several snippets (#3110 (closed))
- Used the first link whose href could be parsed by
getGitHubState()
, which could be any inline link in a GitHub comment (#771 (closed))
Snippet code views are now resolved using the fileLineContainerResolver
, to the closes element containing both the code and the permalink. Several snippets contained in the same comment can be accurately resolved.
Test Plan
Code Hosts
-
GitHub -
GitHub Enterprise -
Refined GitHub -
Phabricator -
Phabricator integration -
Bitbucket -
Gitlab
Browsers
-
Chrome -
Firefox