Fixed #3276 - [Content Analysis/Permalink] - Keyword with fullstop (.) is not detected in permalink because the . is converted to - in the URL#12
Open
Nickbahson wants to merge 3 commits intorankmath:masterfrom
Conversation
balazspiller
left a comment
There was a problem hiding this comment.
Previous version was okay too, I was just wondering why we did it that way.
BTW, on the next line: .replace( "'", '' ) only replaces the first occurrence. Is that what we want to do or is that a mistake?
And on the line after that we have .replace( /[-_]/ig, '-' ) which is also kind of strange because why do we replace - with the same - character? Shouldn't it be .replace( /[-_]+/ig, '-' ) (notice the +) so that multiple --- and ___ will be replaced by a single -?
Sorry @Nickbahson I know these are not related to your changes, but they caught my attention.
balazspiller
approved these changes
Jul 17, 2024
Collaborator
|
I too think we should replace all occurrences and not just the first as mentioned by @balazsrm. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #3276