Skip to content
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 Empty Field Handling in RIS Parser #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AliAzlanDev
Copy link

This PR enhances the parseRef function in modules/ris.js to correctly handle empty field values in RIS bibliographic files, ensuring proper citation data extraction.

Changes

  • Added validation to prevent empty line values from being set as lastField
  • Improved handling of fieldLookup.rl cases with empty values
  • Fixed issue where subsequent field identifiers were incorrectly appended to previous field values

Example

For a RIS entry with an empty abstract field:

TY  - JOUR
PY  - 2018
AB  - 
TI  - Formulation of Herbal Gel of Antirrhinum majus Extract and Evaluation of its Anti-Propionibacterium acne Effects
ER  - 

Before: Year was incorrectly parsed as "2018\rAB - "
After: Year is correctly parsed as "2018"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant