<commit_before>{% macro typeList(types) -%}
{%- set sep = joiner('|') %}
{% for typeName in types %}<code class="api-type {$ typeName | typeClass $}">{$ typeName | escape $}</code>{% endfor %}
{%- endmacro -%}

{%- macro paramList(params) %}
  {% for param in params %}
  <md-item class="api-params-item">
    <md-item-content>
      <div class="api-params-label" flex="35" flex-gt-sm="20">
        {$ param.name $}
        {% if param.alias %}| {$ param.alias $}{% endif %}
        <span hide show-sm>
          {$ typeList(param.typeList) $}
        </span>
        {% if param.type.optional %}<div><em>(optional)</em></div>{% endif %}
      </div>
      <div class="api-params-label" hide-sm flex="15">
        {$ typeList(param.typeList) $}
      </div>
      <div class="api-params-content" flex>
        <p>{$ param.description | marked $}
        {% if param.default %}<p><em>(default: {$ param.default $})</em></p>{% endif %}
        </p>
      </div>
    </md-item-content>
  </md-item>
  {% endfor %}
{% endmacro -%}

{%- macro paramTable(params) %}
<md-list>
  <md-item>
    <md-item-content class="dashed_bottom">
      <div class="api-params-label api-params-title"  flex="20" layout layout-align="center center" >
        Parameter
      </div>
      <div class="api-params-label api-params-title"  flex="15" layout layout-align="center center" block-sm >
        Type
      </div>
      <div class="api-params-content api-params-title" flex     layout="row" layout-align="center center" >
        Description
      </div>
    </md-item-content>
  </md-item>
  {$ paramList(params) $}
</md-list>
{% endmacro -%}



{%- macro directiveParam(name, type, join, sep) %}
  {%- if type.optional %}[{% endif -%}
  {$ name | dashCase $}{$ join $}{$ type.description $}{$ sep $}
  {%- if type.optional %}]{% endif -%}
{% endmacro -%}

{%- macro functionOptionSyntax(fn) %}
  {%- set sep = joiner(', ') -%}
  <code>{$ fn.name $}({</code>
    {%- for param in fn.params %}
    <br/>&nbsp;&nbsp;<code>{%- if param.type.optional %}[{% endif -%}
    {$ param.name $}: {$ param.type.name $}
    {%- if param.type.optional %}]{% endif -%},</code>
    {% endfor %}
  <br/><code>});</code>
{% endmacro -%}

{%- macro functionSyntax(fn) %}<commit_msg>update(docs): improve description layout in API table<commit_after>{% macro typeList(types) -%}
{%- set sep = joiner('|') %}
{% for typeName in types %}<code class="api-type {$ typeName | typeClass $}">{$ typeName | escape $}</code>{% endfor %}
{%- endmacro -%}

{%- macro paramList(params) %}
  {% for param in params %}
  <md-item class="api-params-item">
    <md-item-content>
      <div class="api-params-label" flex="35" flex-gt-sm="20">
        {$ param.name $}
        {% if param.alias %}| {$ param.alias $}{% endif %}
        <span hide show-sm>
          {$ typeList(param.typeList) $}
        </span>
        {% if param.type.optional %}<div><em>(optional)</em></div>{% endif %}
      </div>
      <div class="api-params-label" hide-sm flex="15">
        {$ typeList(param.typeList) $}
      </div>
      <div class="api-params-content" flex>
        <p>{$ param.description | marked $}
        {% if param.default %}<p><em>(default: {$ param.default $})</em></p>{% endif %}
        </p>
      </div>
    </md-item-content>
  </md-item>
  {% endfor %}
{% endmacro -%}

{%- macro paramTable(params) %}
<md-list>
  <md-item>
    <md-item-content class="dashed_bottom">
      <div class="api-params-label api-params-title"  flex="20" layout layout-align="center center" >
        Parameter
      </div>
      <div class="api-params-label api-params-title"  flex="15" layout layout-align="center center" block-sm >
        Type
      </div>
      <div class="api-params-content api-params-title" flex     layout="row" layout-align="left center" style="padding-top:15px">
        Description
      </div>
    </md-item-content>
  </md-item>
  {$ paramList(params) $}
</md-list>
{% endmacro -%}



{%- macro directiveParam(name, type, join, sep) %}
  {%- if type.optional %}[{% endif -%}
  {$ name | dashCase $}{$ join $}{$ type.description $}{$ sep $}
  {%- if type.optional %}]{% endif -%}
{% endmacro -%}

{%- macro functionOptionSyntax(fn) %}
  {%- set sep = joiner(', ') -%}
  <code>{$ fn.name $}({</code>
    {%- for param in fn.params %}
    <br/>&nbsp;&nbsp;<code>{%- if param.type.optional %}[{% endif -%}
    {$ param.name $}: {$ param.type.name $}
    {%- if param.type.optional %}]{% endif -%},</code>
    {% endfor %}
  <br/><code>});</code>
{% endmacro -%}

{%- macro functionSyntax(fn) %}
{'fraction_non_alphanumeric': 0.2261747913921827, 'fraction_numerical': 0.004830917874396135, 'mean_word_length': 2.7520593080724876, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4880687', 'n_tokens_mistral': 1713, 'n_tokens_neox': 1577, 'n_words': 315}