aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2026-02-17 08:26:39 +0100
committeralex <alex@pdp7.net>2026-02-17 08:26:39 +0100
commitfb45a0401894b43ccebebb824d69ab56314ae440 (patch)
tree625eec1e39894e2d4ab998025db1199759aed492
parent4cfe4cf317035c089491acb351c1eed146feef54 (diff)
Fix links without name
-rw-r--r--gemini-to-web/src/gemini_to_web/html.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gemini-to-web/src/gemini_to_web/html.py b/gemini-to-web/src/gemini_to_web/html.py
index b192402..28a3988 100644
--- a/gemini-to-web/src/gemini_to_web/html.py
+++ b/gemini-to-web/src/gemini_to_web/html.py
@@ -76,7 +76,7 @@ def to_html(parsed: list[parser.GemElement], title_extractor=first_header_title_
elif building_element is not None and building_element != htmlgenerator.P:
body, building_element, building_content = close(body, building_element, building_content)
building_element = htmlgenerator.P
- building_content = [htmlgenerator.A(link_name, href=url)]
+ building_content = [htmlgenerator.A(link_name or url, href=url)]
case parser.ListItem(text):
if building_element == htmlgenerator.UL:
building_content.append(htmlgenerator.LI(text))