Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -122,6 +122,9 @@ def format_citation_html(url, fragment_text, author, year, scc_hash):
|
|
| 122 |
full_url = f"{url}#:~:text={encoded_fragment}"
|
| 123 |
return f'<a href="{full_url}" data-hash="{scc_hash}">{author}, {year}</a>'
|
| 124 |
|
|
|
|
|
|
|
|
|
|
| 125 |
def copy_to_clipboard_js(text, button_id):
|
| 126 |
"""Generate JavaScript for copying text to clipboard"""
|
| 127 |
return f"""
|
|
|
|
| 122 |
full_url = f"{url}#:~:text={encoded_fragment}"
|
| 123 |
return f'<a href="{full_url}" data-hash="{scc_hash}">{author}, {year}</a>'
|
| 124 |
|
| 125 |
+
def check_for_fragment(url):
|
| 126 |
+
return '#:~:text=' in url
|
| 127 |
+
|
| 128 |
def copy_to_clipboard_js(text, button_id):
|
| 129 |
"""Generate JavaScript for copying text to clipboard"""
|
| 130 |
return f"""
|