From 86122af4e580a35e59d2f1531a86e3e0c2d81523 Mon Sep 17 00:00:00 2001 From: Jake <j.vondoemming@stud.uni-goettingen.de> Date: Thu, 4 Aug 2022 15:58:54 +0200 Subject: [PATCH] fixed inline quoted --- docs/content.json | 2 +- docs/content.md | 2 +- fgs/pandoc.py | 2 +- theme/templates/macros/content_renderer.html | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/content.json b/docs/content.json index 2a57187..9335e09 100644 --- a/docs/content.json +++ b/docs/content.json @@ -123,7 +123,7 @@ "single", "double" ], - "text": "text" + "content": "inlines" }, "math": { "eclass": "inline", diff --git a/docs/content.md b/docs/content.md index cd8b00c..f417821 100644 --- a/docs/content.md +++ b/docs/content.md @@ -249,7 +249,7 @@ | etype | `quoted` | | | eclass | `inline` | | | quotetype | `single` \| `double` | | -| text | String | | +| content | \[[Inline](#inlines)\] | | ### math diff --git a/fgs/pandoc.py b/fgs/pandoc.py index 3bff878..d3ebc20 100644 --- a/fgs/pandoc.py +++ b/fgs/pandoc.py @@ -361,7 +361,7 @@ class InlineQuoted(Inline): # QuoteType Text etype = "quoted" def parse_internal(self, pandocraw): self.quotetype = self.parse_enum({"SingleQuote": "single", "DoubleQuote": "double"}, pandocraw[0]) - self.text = self.parse_text(pandocraw[1]) + self.content = self.parse_inlines(pandocraw[1]) class InlineMath(Inline): # MathType Text etype = "math" diff --git a/theme/templates/macros/content_renderer.html b/theme/templates/macros/content_renderer.html index a9bf004..610e05f 100644 --- a/theme/templates/macros/content_renderer.html +++ b/theme/templates/macros/content_renderer.html @@ -302,13 +302,13 @@ {%- macro render_inline_quoted(inline, lang) -%} {%- set quotetype = inline['quotetype'] -%} - {%- set text = inline['text'] -%} + {%- set content = inline['content'] -%} {%- if quotetype == "single" -%} - {{ t[lang].quotations.single.left }}{{ text|e }}{{ t[lang].quotations.single.right }} + {{ t[lang].quotations.single.left }}{{ render_inlines(content, lang) }}{{ t[lang].quotations.single.right }} {%- elif quotetype == "double" -%} - {{ t[lang].quotations.double.left }}{{ text|e }}{{ t[lang].quotations.double.right }} + {{ t[lang].quotations.double.left }}{{ render_inlines(content, lang) }}{{ t[lang].quotations.double.right }} {%- else -%} - "{{ text|e }}" + "{{ render_inlines(content, lang) }}" {%- endif -%} {%- endmacro -%} -- GitLab