Fix: paragraph format
This commit is contained in:
parent
0800969c39
commit
497edf0e1e
1 changed files with 7 additions and 2 deletions
|
@ -459,7 +459,8 @@ class GeminiTranslator(SphinxTranslator):
|
||||||
self.add_text(':')
|
self.add_text(':')
|
||||||
|
|
||||||
def depart_field_name(self, node: Element) -> None:
|
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:
|
def visit_field_body(self, node: Element) -> None:
|
||||||
pass
|
pass
|
||||||
|
@ -682,7 +683,11 @@ class GeminiTranslator(SphinxTranslator):
|
||||||
raise nodes.SkipNode
|
raise nodes.SkipNode
|
||||||
|
|
||||||
def visit_Text(self, node: Text) -> None:
|
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:
|
def depart_Text(self, node: Text) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue