Skip to content
Snippets Groups Projects
Verified Commit 86122af4 authored by Jake's avatar Jake
Browse files

fixed inline quoted

parent 018a4fd4
No related branches found
No related tags found
No related merge requests found
Pipeline #313201 passed
......@@ -123,7 +123,7 @@
"single",
"double"
],
"text": "text"
"content": "inlines"
},
"math": {
"eclass": "inline",
......
......@@ -249,7 +249,7 @@
| etype | `quoted` | |
| eclass | `inline` | |
| quotetype | `single` \| `double` | |
| text | String | |
| content | \[[Inline](#inlines)\] | |
### math
......
......@@ -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"
......
......@@ -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 -%}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment