yilunzhao commited on
Commit
5c5c038
·
verified ·
1 Parent(s): 9f3c4d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -51,7 +51,6 @@ def insert_sentence(text, sentence, interval):
51
  return '\n'.join(new_lines)
52
 
53
 
54
- from pybtex.errors import MissingFieldError
55
  def format_bibtex(paper, style='apa'):
56
  bibtex_entry = paper["citationStyles"]["bibtex"]
57
  try:
@@ -60,7 +59,7 @@ def format_bibtex(paper, style='apa'):
60
  entries = list(bib_data.entries.values())
61
  formatted = formatter.format_entries(entries)
62
  return '\n'.join(e.text.render_as('text') for e in formatted)
63
- except MissingFieldError:
64
  # Fallback: ▸ return raw BibTeX ▸ or convert to a safe @misc record
65
  return bibtex_entry.strip()
66
 
 
51
  return '\n'.join(new_lines)
52
 
53
 
 
54
  def format_bibtex(paper, style='apa'):
55
  bibtex_entry = paper["citationStyles"]["bibtex"]
56
  try:
 
59
  entries = list(bib_data.entries.values())
60
  formatted = formatter.format_entries(entries)
61
  return '\n'.join(e.text.render_as('text') for e in formatted)
62
+ except:
63
  # Fallback: ▸ return raw BibTeX ▸ or convert to a safe @misc record
64
  return bibtex_entry.strip()
65