Compare commits

..

No commits in common. "7ee84470e93a374996776aa4cd75c5cfdc006afa" and "17920077daa97889f8c47fdce0523ace2a99865c" have entirely different histories.

2 changed files with 4 additions and 9 deletions

View file

@ -7,10 +7,6 @@
\it{}#1%
}}
\def\textasciitilde{$\sim$}
\def\N{{\bb N}}
\def\R{{\bb R}}
\def\E{{\bb E}}
@ -24,10 +20,9 @@
\fncount=1
\def\fnmark{$^{\the\fncount}$}
\def\fn#1{\footnote\fnmark{#1}\advance\fncount by 1}
\def\sectioneject{\vfil\supereject}
\def\section#1#2{
\sectioneject
\vskip 16pt\vbox{\settextsize{20}\bf #1\kern 1em\relax#2%
\vfil\supereject
\vbox{\settextsize{20}\bf #1\kern 1em\relax#2%
\addtoc\tocsection{#1}{}{#2}%
}\nobreak\vskip 12pt
}

View file

@ -228,12 +228,12 @@ class TransformProcessor(NOPProcessor):
importedDoc = import_md(open(filename, "r").read())
self.transform(importedDoc.content)
elif e.attributes["type"] == "module":
matches = re.match(r"^([\w\.]+)(?: as (\w+))?$", e.content[0].text[1:])
matches = re.match(r"^(\w+)(?: as (\w+))?$", e.content[0].text[1:])
if not matches:
raise SyntaxError(f"`{e.content[0].text[1:]}`: invalid syntax")
module = importlib.import_module(matches.group(1))
module_name = matches.group(1) if matches.group(2) is None else matches.group(2)
self.context.add_commands_from_module(module, "")
self.context.add_commands_from_module(module, module_name)
elif e.attributes["type"] == "metadata":
filename = self.context.dir + "/" + e.content[0].text[1:]
self.context.add_dep(filename)