From 3fe5eef940dbadbd08e590ff8bc55e1dbbb058b9 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Thu, 9 Nov 2023 14:31:30 +0100 Subject: [PATCH] temp --- papyri/templates/macros.tpl.j2 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/papyri/templates/macros.tpl.j2 b/papyri/templates/macros.tpl.j2 index 5406fdf3..3466609c 100644 --- a/papyri/templates/macros.tpl.j2 +++ b/papyri/templates/macros.tpl.j2 @@ -1,10 +1,6 @@ e{% macro render_inner(type_, obj) -%} - {% if type_[0] == 'M' %} - {{ render_myst(obj) }} - {%- elif type_ == 'Directive' -%} - - {{ render_myst(obj) }} - {%- elif type_ == 'RefInfo' -%} + {%- if type_ == 'RefInfo' -%} + {{unreachable(type_, obj.__class__.__name__, obj.__dict__)}} {# Links have : value, reference, kind exists#} {%- if obj.kind=='local' -%} {{obj.path}} @@ -13,7 +9,10 @@ e{% macro render_inner(type_, obj) -%} {%- else %} {{unreachable(type_, obj.__class__.__name__, obj.__dict__)}} {%- endif -%} - {%- elif type_ in ('Math', 'Verbatim', 'Link') -%} + {%- elif type_ == 'Directive' -%} + + {{ render_myst(obj) }} + {%- elif type_ in ('Math', 'Verbatim', 'Link', 'MText','MEmphasis','MInlineCode') -%} {{ render_myst(obj) }} {%- elif type_ in ['SubstitutionRef','Unimplemented'] %} {{unimplemented(type_, obj.__class__.__name__, obj.__dict__)}}