-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[FIX] Match all occurrences of {static}
/ {attach}
#3420
base: main
Are you sure you want to change the base?
Conversation
Can you add a test? |
db84f84
to
817343b
Compare
@mart-e: There is a test failure, which needs to be addressed. If that test failure is due to the updated regex now actually correctly replacing the second |
@justinmayer no that test failure is the test I am adding, looks like my patch is actually not working/not enough. I have some troubles to invoke the test suit on my machine (probably some setup issues). |
Let's start with getting the tests running on your local workstation… What have you done so far, and what seems to be the problem with running the tests? |
If a markup element contains more than one {static} or {attach} value, only the last one was replaced. Simplify the regex to match every occurrence Fixes getpelican#3419
817343b
to
0177773
Compare
Looks like your test now passes. Bravo, Martin! Well done 👏 |
{static}
/ {attach}
Ok, I have figured out what was the issue, missing file declaration in my new test.
I used
|
I do not believe there should be any cd ~/projects/pelican
fd --hidden --glob '*.orig' --exec trash (Above requires you have some kind of |
Oh you are right, much better when purging those files, I can run the tests now. Thanks a lot for your help 👍 As a sidenote, I am no longer the initial example with two attributes containing Or maybe somebody better than me in regex can find a way to achieve the same while still checking the starting |
If a markup element contains more than one {static} or {attach} value, only the last one was replaced.
Simplify the regex to match every occurrence.
This regex no longer checks for
<
at the start which may imply false positive (to test if acceptable or not).Detail of the issue: #3419