Improve paragraph style names and add comments

This commit is contained in:
object-Object 2023-10-26 00:23:58 -04:00
parent ae4a1fa021
commit 863089d1ac
2 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,5 @@
{# CommandStyle #}
{% macro command_obfuscated(style) -%}
<span class='obfuscated'>{{ caller() }}</span>
{%- endmacro %}
@ -22,6 +24,8 @@
{{ caller() }}
{%- endmacro %}
{# FunctionStyle #}
{% macro function_tooltip(style) -%}
<span class='has-tooltip' title='{{ style.value }}'>{{ caller() }}</span>
{%- endmacro %}
@ -34,14 +38,18 @@
<span style='color: #{{ style.value }}'>{{ caller() }}</span>
{%- endmacro %}
{# LinkStyle #}
{% macro special_link(style) -%}
<a href='{{ style.href() }}'>{{ caller() }}</a>
{%- endmacro %}
{% macro special_paragraph_paragraph(style) -%}
{# ParagraphStyle #}
{% macro paragraph_paragraph(style) -%}
<p>{{ caller() }}</p>
{%- endmacro %}
{% macro special_paragraph_list_item(style) -%}
{% macro paragraph_list_item(style) -%}
<p class='fake-li'>{{ caller() }}</p>
{%- endmacro %}

View file

@ -284,7 +284,7 @@ class ParagraphStyle(Style, frozen=True):
@property
def macro(self) -> str:
return f"{super().macro}_{self.subtype.name}"
return f"paragraph_{self.subtype.name}"
class FunctionStyle(Style, frozen=True):