Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add ability to recognize links to the same page #16994
Add ability to recognize links to the same page #16994
Changes from 49 commits
4e1f7cd
60dd50a
9d13634
445be6c
82d34be
e0ac8a8
253e576
eb01b6f
5cf585c
ba36a24
4c4d8e3
a965d2d
fae812b
cedfc69
362e583
549a40c
5e35313
13bf11d
bf290bb
b032b2e
c156c71
456facb
b483be6
a18de14
5efea77
f84d23e
ffad846
37c9bf4
d4b9ea2
69bd7e7
e207ca5
07ddb09
984a59e
90bbd12
4b21bb3
d602cbe
4fbe4cb
cd347d2
df22719
a0af6ee
d1c6286
af32760
65d82db
161b2fa
a2b1a88
f0cbcbe
9e767d2
48f1b61
db0c8cd
fab26cf
b91c8d2
0bcc928
4849e6b
bbce160
8fb71ca
d6d59f8
1fc8382
4e331d5
e526e25
0cb9b6b
19bcae9
ce7396b
1dab305
64cbf92
da60228
8eddd33
1529e2c
9dff709
30381ed
8620913
957d541
96d8462
aa83277
b8eb917
2ca89c0
18b0034
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
can you explain why these are not considered valid in the comment, and how it relates to the filtering below
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.
I understand why
/
is an invalid fragment char, but I would have thought that%
was valid.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.
I think that @CodeRabbit doesn't consider it valid.
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.
I think that @coderabbitai doesn't consider this valid.
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.
@nvdaes, you're correct that
%
is valid in URL fragments, especially since it's used in URL encoding to represent special characters. The current logic insource/utils/urlUtils.py
might need to be revised to allow%
in fragments, as it is a standard practice in URLs. We should consider updating the code to reflect this.Analysis chain
Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 263381
Learnings added
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.
why not? this seems like unexpected behaviour?
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.
I think that this test is valid, since the target and root url are equal and then the page maybe refreshed, but the link target is not an anchor for the same page.
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.
Perhaps the function should be renamed then
isLinkToSamePageAnchor
or similar?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.
I really don't follow the logic on this one.
If I am on the page:
And there is a standard menu on that page with a link called "Contact Us", linking to:
I would expect that to say "Contact Us Link in-page link", or whatever the label for a same page link is.
This seems like the very definition of a same page link.
But this test is expected to fail, meaning that what I would anticipate is wrong.
Can you explain this more?
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.
I agree.
Either the concept is just for anchors, and we communicate it that way, or the concept is for same page links, which includes links to the exact same page.
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.
The concept is for same page links