-
Notifications
You must be signed in to change notification settings - Fork 19
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
Split cleaning logic into functions #102
Split cleaning logic into functions #102
Conversation
@DrKain please review. This is a first pass solution - purely splitting out the functionality from I wasn't able to test as the |
This fails several of the example links in the README section. Did you use copilot for this PR?
|
Ahh, I missed the examples in the README. Didn't use copilot but wasn't able to test. Let me see what's wrong and fix it up. |
@DrKain ok please re-check when you can, found the issue and fixed it:
PS: TIL you can perform operations such as // Works
function testPassByRef1(a) {
a.push(4);
a.push(5);
}
// Doesn't work!
function testPassByRef2(a) {
a = ['a', 'b', 'c'];
}
let arr = [1,2,3];
console.log(arr); // [1,2,3]
testPassByRef1(arr);
console.log(arr); // [1,2,3,4,5]
testPassByRef2(arr);
console.log(arr); // [1,2,3,4,5] |
At a glance the amazon link is not being cleaned correctly and empty page anchors will still throw an error. As for the array comment you should return the modified data and update accordingly. function testPassByRef1(a) {
a.push(4);
a.push(5);
return a;
}
function testPassByRef2(a) {
a = ['a', 'b', 'c'];
return a;
}
let arr = [1,2,3];
console.log(arr); // [ 1, 2, 3 ]
arr = testPassByRef1(arr);
console.log(arr); // [ 1, 2, 3, 4, 5 ]
arr = testPassByRef2(arr);
console.log(arr); // [ "a", "b", "c" ] This is why your PR is not functioning correctly. |
Just letting you know I'll be away for an indeterminate amount of time. If you want to keep working on this PR you're more than welcome to, I will take another look if/when I return. |
Closing due to broken code, inactivity, lack of communication and largely outdated handlers. |
Created this PR based on the discussion in #101.
For reference, here are the mappings from the code comments to the 10 items mentioned in the issue. I split into functions the code I found under these comments.