{% macro plain_text() -%}
  {{ caller()|replace("*", "\\*") }}
{%- endmacro %}

{# CommandStyle #}

{% macro command_obfuscated(style) -%}
  ||{{ caller() }}||
{%- endmacro %}

{% macro command_bold(style) -%}
  **{{ caller() }}**
{%- endmacro %}

{% macro command_strikethrough(style) -%}
  ~~{{ caller() }}~~
{%- endmacro %}

{% macro command_underline(style) -%}
  __{{ caller() }}__
{%- endmacro %}

{% macro command_italic(style) -%}
  *{{ caller() }}*
{%- endmacro %}

{% macro special_base(style) -%}
  {{ caller() }}
{%- endmacro %}

{# FunctionStyle #}
{# TODO: implement #}

{% macro function_tooltip(style) -%}
  {{ caller() }}
{%- endmacro %}

{% macro function_cmd_click(style) -%}
  {{ caller() }}
{%- endmacro %}

{% macro special_color(style) -%}
  {{ caller() }}
{%- endmacro %}

{# LinkStyle #}

{% macro special_link(style) -%}
  [{{ caller() }}]({{
    page_url~style.href()
    if style.href().startswith("#")
    else style.href()
  }})
{%- endmacro %}

{# ParagraphStyle #}

{% macro paragraph_paragraph(style) -%}
  {{ caller()~"\n" }}
{%- endmacro %}

{% macro paragraph_list_item(style) -%}
{{ "  " * style.level }}- {{ caller()~"\n" }}
{%- endmacro %}
