-
Notifications
You must be signed in to change notification settings - Fork 1
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
Dollar sign within quotations fix #151
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #151 +/- ##
==========================================
- Coverage 95.19% 93.36% -1.83%
==========================================
Files 4 4
Lines 208 226 +18
==========================================
+ Hits 198 211 +13
- Misses 10 15 +5 ☔ View full report in Codecov by Sentry. |
Thanks so much @e-perl-NOAA!! Working on reviewing this now! |
7101938
to
bf7aed7
Compare
bf7aed7
to
50a5576
Compare
cc9c0b4
to
58c37b3
Compare
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.
Thanks so much @e-perl-NOAA, this is a great fix!!! I added a test to test that to make sure it works and it does!
However, I did realized we didn't account for nested lists in quotes, e.g., "list$item1$item2 in quotes"
, so I added some additional code; could you see if that looks good to you (I did add a test for this scenariom too)? If it looks good, I think we can merge this in!
Just tested the nested portion locally and it works for me! |
I'll let you merge it in! |
See issue #150.
A fix in rm_dollar_sign.R to change text()$text within quotes (which would normally throw an error because it converted it to text()[["text"]]) to text()[['text']] instead, thereby fixing the issue of multiple double quotes in a line.
Tested locally by using the r4ss function file (get_ss3_exe.r) that originally made me aware of this issue:
https://github.com/r4ss/r4ss/blob/bb679f422ef6aa9189fe99c14375bee00dab2fa1/R/get_ss3_exe.r#L87
To test via GitHub actions I reverted the fixed line in the main branch of r4ss which has
curl::curl_version()[['ssl_version']]
back tocurl::curl_version()$ssl_version
and then ran the updated rm_dollar_sign.R function and had a successful run here.