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

Failure to parse "\{" #29

Open
pjhuxford opened this issue Jun 22, 2024 · 1 comment
Open

Failure to parse "\{" #29

pjhuxford opened this issue Jun 22, 2024 · 1 comment

Comments

@pjhuxford
Copy link

Here is an example demonstrating the issue:

use nom_bibtex::Bibtex;

fn main() {
    let src =
        r#"@book {fake_book, title = {Escaping: all about the \{ character},}"#;
    match Bibtex::parse(src) {
        Ok(bib) => {
            let entry = &bib.bibliographies()[0];
            println!("{}", entry.tags().get("title").unwrap());
        },
        Err(_) => {
            println!("Failed to correctly parse \\{{");
        }
    };
}

Expected output: Escaping: all about the \{ character or Escaping: all about the { character.

Observed output: Failed to correctly parse \{.

@charlesvdv
Copy link
Owner

Thanks for reporting the issue! Unfortunately, I'm pretty busy at the moment but I'm happy to accept a PR to fix the issue.

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

No branches or pull requests

2 participants