]> git.scottworley.com Git - paperdoorknob/commitdiff
Support _ in URLs
authorScott Worley <scottworley@scottworley.com>
Sun, 31 Dec 2023 09:16:00 +0000 (01:16 -0800)
committerScott Worley <scottworley@scottworley.com>
Sun, 31 Dec 2023 09:35:45 +0000 (01:35 -0800)
paperdoorknob.py
paperdoorknob_test.py

index 0fd1fdeceb6a5b9ff64b1a421fcc3b8f71a57c5a..72ec1a5669f48595fba7b640aff98de2da1b6069 100644 (file)
@@ -35,7 +35,7 @@ def process(spec: Spec) -> None:
                           spec.geometry.encode('UTF-8') +
                           b']{geometry}\n')
     spec.texout.write(b'''\\begin{document}
                           spec.geometry.encode('UTF-8') +
                           b']{geometry}\n')
     spec.texout.write(b'''\\begin{document}
-\\newcommand{\\href}[2]{#2\\footnote{#1}}
+\\newcommand{\\href}[2]{#2\\footnote{\\detokenize{#1}}}
 ''')
     url = flatURL(spec.url)
     spec.log('Fetching HTML...\r')
 ''')
     url = flatURL(spec.url)
     spec.log('Fetching HTML...\r')
index c4232829a9b41a940728cce880bc87fcee4a4613..511abb3c17d6ae676be0cd838e5e5b8587e95526 100644 (file)
@@ -50,7 +50,7 @@ class BaseTestProcess(ABC):
         assert re.match(br'''\\documentclass{article}
 (\\usepackage{[a-z]+}\n)+\\usepackage\[margin=20mm\]{geometry}
 \\begin{document}
         assert re.match(br'''\\documentclass{article}
 (\\usepackage{[a-z]+}\n)+\\usepackage\[margin=20mm\]{geometry}
 \\begin{document}
-\\newcommand{\\href}\[2\]{#2\\footnote{#1}}
+\\newcommand{\\href}\[2\]{#2\\footnote{\\detokenize{#1}}}
 This is \\href{https://glowfic.com}{glowfic}
 
 You \\emph{sure}\?
 This is \\href{https://glowfic.com}{glowfic}
 
 You \\emph{sure}\?