From 0800969c39ad1cf04544e7633cc33331f5a7a9c8 Mon Sep 17 00:00:00 2001 From: "kujiu (@rincevent)" Date: Sun, 31 Jan 2021 03:33:04 +0100 Subject: [PATCH] Add: Link references --- sphinx_gemini_builder/writer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sphinx_gemini_builder/writer.py b/sphinx_gemini_builder/writer.py index 12b1f19..ca98e8d 100644 --- a/sphinx_gemini_builder/writer.py +++ b/sphinx_gemini_builder/writer.py @@ -592,7 +592,11 @@ class GeminiTranslator(SphinxTranslator): pass def visit_reference(self, node: Element) -> None: - pass + if 'refuri' in node: + self.end_block() + self.add_link(node['refuri'], node.astext()) + self.end_block() + raise nodes.SkipNode def depart_reference(self, node: Element) -> None: pass