Skip to content

bug: incorrect handling of lastnames with whitespaces #167

@CheariX

Description

@CheariX

One of my co-author's lastname could not be correctly parsed due to whitespaces.
I'm referring to this Bibtex entry.
The BibTeX was condensed to the essential components as demonstrated in the code example provided below.

require 'bibtex'

b = BibTeX.parse <<-END
@inproceedings{10.1145/3319535.3339812,
author = {Mladenov, Vladislav and Mainka, Christian and Meyer zu Selhausen, Karsten and Grothe, Martin and Schwenk, J\"{o}rg},
}
END

if b['10.1145/3319535.3339812'].author[2].last == "Meyer zu Selhausen"
    puts "Correct."
   else
    puts "Incorrect. Should be: 'Meyer zu Selhausen'. Current: '#{b['10.1145/3319535.3339812'].author[2].last}'"
   end

Output:

Incorrect. Should be: 'Meyer zu Selhausen'. Current: 'Selhausen'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions