-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
CTAN.bib - @online parsed, but its comment #12929
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
Comments
/assign-me |
👋 Hey @Zurtar, thank you for your interest in this issue! 🎉 We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly. In case you encounter failing tests during development, please check our developer FAQs! Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback. Happy coding! 🚀 |
I'm not sure what the solution would be, the parser can skip if its not within the first x columns like you suggested but that would end up skipping valid entries. For example, entries that have comments and the key on the same line: @Test
void parseCommentAndEntryInOneLine() throws IOException {
String bibtexEntry = """
Some random comment that should stay here @Article{test,
Author = {Foo Bar},
Journal = {International Journal of Something},
Note = {some note},
Number = {1}
}""";
(...)
} Maybe it could check if any entry is malformed and is missing its open/closing brackets regardless of comments? But then we'd just end up showing that same warning popup to the user. |
@koppor Any ideas? |
Checking for validity is a nice idea. I would be more straightforward: A) Check if line starts with comment indicator string: %, #, --, *, // - and then treat the whole line as comment B) Enforce Entries start at column 1 and adapt the test (and then call for user feedback on Mastodon etc) Option A is more backwards compatible |
@Test
void parseCommentAndEntryInOneLine() throws IOException {
String bibtexEntry = """
Some random comment that should stay here @Article{test,
Author = {Foo Bar},
Journal = {International Journal of Something},
Note = {some note},
Number = {1}
}""";
(...)
} This would be valid, but if it had a comment indicator before it the parser would skip it. Which seems arbitrary. We could also just then have |
Do you have another proposal? We could use AI as fallback - if the user has enabled AI usage in JabRef. Other than that, Option A seems to make things better |
JabRef version
6.0-alpha
Operating system
macOS
Details on version and operating system
mac os 15.5
Checked with the latest development build (copy version output from About dialog)
Steps to reproduce the behaviour
The problem is
The parser should skip this, maybe by checking only the first x columns for the @ sign
Appendix
...
Log File
The text was updated successfully, but these errors were encountered: