From 840f3a82b8acbf8c5603295de5852cb6cf08b23e Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Thu, 9 Nov 2023 14:19:45 +0100 Subject: [PATCH] reformat --- papyri/render.py | 1 + papyri/templates/macros.tpl.j2 | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/papyri/render.py b/papyri/render.py index 114e78aa..67be638d 100644 --- a/papyri/render.py +++ b/papyri/render.py @@ -949,6 +949,7 @@ def pygment_css() -> Response: async def serve_app(subpath): print("subpath...", subpath) import glob + here = Path(os.path.dirname(__file__)) if "main" in subpath: ext = subpath.split(".")[-1] diff --git a/papyri/templates/macros.tpl.j2 b/papyri/templates/macros.tpl.j2 index d4d3655e..5406fdf3 100644 --- a/papyri/templates/macros.tpl.j2 +++ b/papyri/templates/macros.tpl.j2 @@ -4,8 +4,6 @@ e{% macro render_inner(type_, obj) -%} {%- elif type_ == 'Directive' -%} {{ render_myst(obj) }} - {%- elif type_ == 'Link' -%} - {{ render_myst(obj) }} {%- elif type_ == 'RefInfo' -%} {# Links have : value, reference, kind exists#} {%- if obj.kind=='local' -%} @@ -15,16 +13,13 @@ e{% macro render_inner(type_, obj) -%} {%- else %} {{unreachable(type_, obj.__class__.__name__, obj.__dict__)}} {%- endif -%} - {%- elif type_ == 'Math' -%} - {{ render_myst(obj) }} - {%- elif type_ == 'Verbatim' -%} + {%- elif type_ in ('Math', 'Verbatim', 'Link') -%} {{ render_myst(obj) }} {%- elif type_ in ['SubstitutionRef','Unimplemented'] %} + {{unimplemented(type_, obj.__class__.__name__, obj.__dict__)}}
{{obj}}
{%- else %} {{unreachable(type_, obj.__class__.__name__, obj.__dict__)}} - |{{type_}}| not implemeted yet -
{{-unimplemented(obj, type_)-}}
{%- endif -%} {%- endmacro %}