diff --git a/sphinx_gemini_builder/writer.py b/sphinx_gemini_builder/writer.py index ca98e8d..d09705b 100644 --- a/sphinx_gemini_builder/writer.py +++ b/sphinx_gemini_builder/writer.py @@ -459,7 +459,8 @@ class GeminiTranslator(SphinxTranslator): self.add_text(':') def depart_field_name(self, node: Element) -> None: - self.add_text(': ') + self.add_text(':') + self.end_block() def visit_field_body(self, node: Element) -> None: pass @@ -682,7 +683,11 @@ class GeminiTranslator(SphinxTranslator): raise nodes.SkipNode def visit_Text(self, node: Text) -> None: - self.add_text(node.astext()) + text = node.astext() + if isinstance(node.parent, nodes.paragraph): + text = text.replace('\r', '') + text = text.replace('\n', ' ') + self.add_text(text) def depart_Text(self, node: Text) -> None: pass