From e2abf8c4fccd92188f3635f65354929adefb60ff Mon Sep 17 00:00:00 2001 From: Lucybean-hi Date: Mon, 12 Dec 2022 06:38:41 +0800 Subject: [PATCH] Update src/latexify/codegen/function_codegen.py Co-authored-by: Zibing Zhang <44979059+ZibingZhang@users.noreply.github.com> --- src/latexify/codegen/function_codegen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/latexify/codegen/function_codegen.py b/src/latexify/codegen/function_codegen.py index 56abd9a..3c23b25 100644 --- a/src/latexify/codegen/function_codegen.py +++ b/src/latexify/codegen/function_codegen.py @@ -169,7 +169,7 @@ def visit_Match(self, node: ast.Match) -> str: case_latexes.append(body_latex + r", & \mathrm{if} \ " + cond_latex) else: case_latexes.append( - self.visit(node.cases[-1].body[0]) + r", & \mathrm{otherwise}" + self.visit(case.body[0]) + r", & \mathrm{otherwise}" ) latex = (