-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix problem reading AASTex table without trailing backslashes at end #5427
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
Conversation
|
cc: @hamogu |
hamogu
left a comment
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.
Looks good to me. (The inline comment I left is clearly irrelevant since exactly this is tested in the tests.)
| """Remove whitespace at the beginning or end of line. Also remove | ||
| \\ at end of line""" | ||
| line = line.split('%')[0] | ||
| line = RE_COMMENT.split(line)[0] |
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 don't know enough about regexpes: What is the line has white space list so: `data1 & data2 \ %and now a comment``?
| if line[-2:] == r'\\': | ||
| line = line.strip(r'\\') | ||
| if line.endswith(r'\\'): | ||
| line = line.rstrip(r'\\') |
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 you can remove the if line.endswith(r'\\'): if you use rstrip. If it doesn't ends with \\ it just does nothing.
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.
@MSeifert04 - yup, that's correct. But in the interest not clogging up CI even more I'm merging this as-is. After the 1.3 frenzy quiets we can do this clean up.
Remove debugging "print" introduced in #5427
Fix problem reading AASTex table without trailing backslashes at end
|
backported to v1.0.x in 1f7cb64 |
Fix problem reading AASTex table without trailing backslashes at end
Fix problem reading AASTex table without trailing backslashes at end
Remove debugging "print" introduced in #5427
Remove debugging "print" introduced in #5427
Closes #5236. (By superceding).