Skip to content

Commit

Permalink
Avoid including invalid links in 1000.html (#575)
Browse files Browse the repository at this point in the history
The current code includes `<p><a href="None">url</a></p>` for every
entry that doesn't have a URL listed.
  • Loading branch information
Ruben-VandeVelde authored Jan 10, 2025
1 parent 92c3fcc commit ff63c36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions make_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class DocDecl:
"""
Data for a documentation entry for a single declaration.
DocDecl objects are created from data in `header-data.json` and processed into HTML
in `templates/100.thml` and `templates/1000.html`.
in `templates/100.html` and `templates/1000.html`.
"""

name: str
Expand Down Expand Up @@ -346,7 +346,7 @@ def download_N_theorems(kind: NTheorems) -> dict:
if kind == NTheorems.Hundred:
(id, links, thms, note) = (h.number, h.links, '100 theorems', h.note)
else:
(id, links, thms, note) = (h.wikidata, {'url': h.url}, '1000+ theorems', h.comment)
(id, links, thms, note) = (h.wikidata, {'url': h.url} if h.url else {}, '1000+ theorems', h.comment)
decls = h.decls or ([h.decl] if h.decl else [])
doc_decls = []
if decls:
Expand Down

0 comments on commit ff63c36

Please sign in to comment.