from images import FakeImageStore
from spec import Spec
from texify import DirectTexifier, PandocTexifier, VerifyingTexifier
from images import FakeImageStore
from spec import Spec
from texify import DirectTexifier, PandocTexifier, VerifyingTexifier
- assert buf.getvalue() == b'''\\documentclass{article}
-\\usepackage{graphicx}
-\\usepackage{wrapfig}
-\\usepackage[margin=20mm]{geometry}
+ assert re.match(br'''\\documentclass{article}
+(\\usepackage{[a-z]+}\n)+\\usepackage\[margin=20mm\]{geometry}
-This is glowfic
-
-\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill
-
-You \\emph{sure}?
-
-\\vspace{-.5\\ht\\strutbox}\\noindent\\hrulefill
-
-Pretty sure.
+(.|\n)*
+\\glowhead{}{}{}{}This is \\href{https://glowfic.com}{glowfic}
+\\glowhead{}{}{}{}You \\emph{sure}\?
+\\glowhead{}{}{}{}Pretty sure.
paperdoorknob.process(spec)
subprocess.run(['pdflatex', 'test.tex'],
stdin=subprocess.DEVNULL, check=True)
paperdoorknob.process(spec)
subprocess.run(['pdflatex', 'test.tex'],
stdin=subprocess.DEVNULL, check=True)
def fetcher(self) -> Fetcher:
with open('testdata/this-is-glowfic.html', 'rb') as f:
def fetcher(self) -> Fetcher:
with open('testdata/this-is-glowfic.html', 'rb') as f: