Skip to content

Fix Empty Field Handling in RIS Parser#2

Open
AliAzlanDev wants to merge 1 commit intoIEBH:masterfrom
AliAzlanDev:master
Open

Fix Empty Field Handling in RIS Parser#2
AliAzlanDev wants to merge 1 commit intoIEBH:masterfrom
AliAzlanDev:master

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