Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Nov 9, 2023
1 parent 84e364f commit 840f3a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions papyri/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
9 changes: 2 additions & 7 deletions papyri/templates/macros.tpl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ e{% macro render_inner(type_, obj) -%}
{%- elif type_ == 'Directive' -%}
<!-- In theory we should never get Raw directive in final output --!>
{{ render_myst(obj) }}
{%- elif type_ == 'Link' -%}
{{ render_myst(obj) }}
{%- elif type_ == 'RefInfo' -%}
{# Links have : value, reference, kind exists#}
{%- if obj.kind=='local' -%}
Expand All @@ -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__)}}
<pre class='not-implemented'>{{obj}}</pre>
{%- else %}
{{unreachable(type_, obj.__class__.__name__, obj.__dict__)}}
<code>|{{type_}}| not implemeted yet</code>
<pre class='not-implemented unreachable'>{{-unimplemented(obj, type_)-}}</pre>
{%- endif -%}
{%- endmacro %}
Expand Down

0 comments on commit 840f3a8

Please sign in to comment.