summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <default@localhost.localdomain>2019-12-30 20:23:57 -0300
committerdefault <default@localhost.localdomain>2019-12-30 20:23:57 -0300
commit5e94b34e9d8af8ff2ca74c724d6c8e2571f01d81 (patch)
treec1c77d2e76abaf5e68fd25fae2f29e4b93ae5fba
parent676de7e59f0627b5ab7c40b3ea129073ca3d8ed9 (diff)
Fix link to topics/español.html
This was failing to be URL-encoded and so the PDF generation died with a missing link destination.
-rw-r--r--dercuano.py3
-rw-r--r--markdown/dercuano-hand-computers7
2 files changed, 8 insertions, 2 deletions
diff --git a/dercuano.py b/dercuano.py
index f5d3416..87b2a04 100644
--- a/dercuano.py
+++ b/dercuano.py
@@ -137,7 +137,8 @@ class Bundle:
def category_link(self, category_name, level=1):
# XXX maybe we should really reify Category as its own class?
return a(self.category_title(category_name),
- href='../' * level + self.category_localpart(category_name))
+ href='../' * level
+ + quote(self.category_localpart(category_name)))
def generate_category(self, category):
vomit_html(self.category_filename(category),
diff --git a/markdown/dercuano-hand-computers b/markdown/dercuano-hand-computers
index 0c72fb7..735e84b 100644
--- a/markdown/dercuano-hand-computers
+++ b/markdown/dercuano-hand-computers
@@ -1128,4 +1128,9 @@ That doesn't seem to be too hard, but I think I need to discriminate
local, relative links from absolute links. A quick and dirty approach
there is just `urlparse(relative_url).path.startswith('/')`, although
there's probably like an `is_relative` property or something
-somewhere, I dunno. And now the PDF is in the proper order. \ No newline at end of file
+somewhere, I dunno. And now the PDF is in the proper order.
+
+Although it seems like I have an URL-encoding problem still; my links
+to the topic "español" are broken, but I'd never noticed until the PDF
+generation croaked on it. Gotta regenerate the HTML!
+