IPF commited on
Commit
3624c7b
·
verified ·
1 Parent(s): 1e1215a

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -503,8 +503,8 @@ def render_citations(text: str, browser: SimpleBrowser) -> str:
503
  pass
504
  return m.group(0)
505
 
506
- # First pass: replace citations with links
507
- result = re.sub(r'【(\d+)†.*?】', replace_citation, text)
508
 
509
  # Second pass: Deduplicate adjacent identical citations
510
  # Matches: <a ...>[N]</a> followed by optional whitespace and same link
 
503
  pass
504
  return m.group(0)
505
 
506
+ # First pass: replace citations with linked citations
507
+ result = re.sub(r'[\[](\d+)†.*?[\]]', replace_citation, text)
508
 
509
  # Second pass: Deduplicate adjacent identical citations
510
  # Matches: <a ...>[N]</a> followed by optional whitespace and same link