FlamingTempura / bibtex-tidy

Cleaner and Formatter for BibTeX files
https://flamingtempura.github.io/bibtex-tidy/
MIT License
832 stars 63 forks source link

Bug: `--enclosing-braces` makes values invalid if they contain escaped characters #423

Closed chrisgrieser closed 5 days ago

chrisgrieser commented 7 months ago
cat test.bib | bibtex-tidy --enclosing-braces=title

Using --enclosing-braces results in escaped characters, such as {\"a}, having their leading { removed, making the whole bibtex entry invalid.

@incollection{BlattelMink2021,
    title = {{Das Innovationsverst{\"a}ndnis von Joseph A. Schumpeter}},
    author = {Bl{\"a}ttel-Mink, Birgit},
}

% becomes
@incollection{BlattelMink2021,
  title         = {{Das Innovationsverst\"a}ndnis von Joseph A. Schumpeter}},
  author        = {Bl{\"a}ttel-Mink, Birgit}
}
jdujava commented 6 months ago

I can confirm this behavior. Also --remove-braces leads to a similar invalid entry.

FlamingTempura commented 5 days ago

Fixed in v1.14.0