From 19507910cfbffac614f8b8d5dbba85088747e8bf Mon Sep 17 00:00:00 2001 From: Nikolay Gniteev Date: Fri, 10 May 2024 00:01:14 +0300 Subject: [PATCH] [src][vdf][files] various minor fixes / refactoring in files spec --- src/vdf/files.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vdf/files.yaml b/src/vdf/files.yaml index 93e5344..503de5b 100644 --- a/src/vdf/files.yaml +++ b/src/vdf/files.yaml @@ -17,8 +17,8 @@ markdown: ext: .md sections: [frontmatter, content] template : |- - {% if 'frontmatter' in sections %}--- - {{ render_section('header__body') }} + {% if hasattr(file_vars, 'frontmatter') %}--- + {{ yaml(file_vars.frontmatter) }} --- {% endif %} @@ -37,7 +37,7 @@ vhdl: template : | {% if 'header__declaration' in sections %}{{ render_section('header__declaration') }} {% endif %} - entity {{ vars.subject }} is{% if 'unit__generics' in sections %} + entity {{ file_vars.subject }} is{% if 'unit__generics' in sections %} generic ( {{ render_section('unit__generics', ' ') }} );{% endif %}{% if 'unit__interface' in sections %} @@ -49,7 +49,7 @@ vhdl: {% if 'header__body' in sections %}{{ render_section('header__body') }} - {% endif %}architecture rtl of {{ vars.subject }} is + {% endif %}architecture rtl of {{ file_vars.subject }} is {% if 'code__declaration' in sections %}{{ render_section('code__declaration', ' ') }}{% endif %} begin {% if 'code__body' in sections %}{{ render_section('code__body', ' ') }}{% endif %}