From f49e791807f4bdb5cc911526f33e27a73d297a0f Mon Sep 17 00:00:00 2001 From: Jiri Kalvoda Date: Mon, 11 Dec 2023 02:27:31 +0100 Subject: [PATCH 1/2] Fix #53 --- src/formatitko/command_util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/formatitko/command_util.py b/src/formatitko/command_util.py index 002aa8c..f11a154 100644 --- a/src/formatitko/command_util.py +++ b/src/formatitko/command_util.py @@ -16,9 +16,9 @@ def parse_command(code: str) -> CommandCallable: for line in code_lines: indented_code_lines.append(("\t" if tabs else " ")+line) code = "def command(element: Command, context: Context) -> list[Element]:\n"+"\n".join(indented_code_lines) - command_env = command_env.__dict__ - exec(code, command_env) - return command_env["command"] + env = {**command_env.__dict__} + exec(code, env) + return env["command"] # This function is called in trasform.py, defining a command which can be # called later From 6fe4ef8aaf907c9a8d5abd0aba2f9b60ad5cc9a0 Mon Sep 17 00:00:00 2001 From: Jiri Kalvoda Date: Mon, 25 Dec 2023 13:50:10 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Fix:=20Do=20HTML=20se=20nepsala=20dvojdolar?= =?UTF-8?q?ov=C3=A1=20matematika?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/formatitko/html_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formatitko/html_generator.py b/src/formatitko/html_generator.py index d7dbc03..d564044 100644 --- a/src/formatitko/html_generator.py +++ b/src/formatitko/html_generator.py @@ -247,7 +247,7 @@ class HTMLGenerator(OutputGenerator): if (e.format == "InlineMath"): self.write(rawhtml) else: - self.writeraw() + self.writeraw(rawhtml) def generate_RawInline(self, e: RawInline): if e.format == "html":