fix: fix map filter used for meta description (#457)

This commit is contained in:
Robert Kaussow 2023-02-16 20:55:31 +01:00 committed by GitHub
parent bad8c7e7a1
commit a95add9fbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 10 deletions

View File

@ -6,8 +6,9 @@
### {{ key }} ### {{ key }}
{% if item.description is defined and item.description %} {% if item.description is defined and item.description %}
{% set description = [item.description] if item.description is string else item.description %}
{{ item.description | map("replace", "\n\n", "\n") | safe_join("\n") }} {{ description | map("replace", "\n\n", "\n") | safe_join("\n") }}
{% endif %} {% endif %}
{% if item.value is defined and item.value %} {% if item.value is defined and item.value %}

View File

@ -9,8 +9,9 @@ summary: {{ meta.summary.value | safe_join(" ") }}
--- ---
{% endif %} {% endif %}
{% if description | deep_get(meta, "description.value") %} {% if description | deep_get(meta, "description.value") %}
{% set description = [meta.description.value] if meta.description.value is string else meta.description.value %}
{{ meta.description.value | map("replace", "\n\n", "\n") | safe_join("\n") }} {{ description | map("replace", "\n\n", "\n") | safe_join("\n") }}
{% endif %} {% endif %}
<!--more--> <!--more-->

View File

@ -3,8 +3,9 @@
# {{ meta.name.value | safe_join(" ") }} # {{ meta.name.value | safe_join(" ") }}
{% endif %} {% endif %}
{% if description | deep_get(meta, "description.value") %} {% if description | deep_get(meta, "description.value") %}
{% set description = [meta.description.value] if meta.description.value is string else meta.description.value %}
{{ meta.description.value | map("replace", "\n\n", "\n") | safe_join("\n") }} {{ description | map("replace", "\n\n", "\n") | safe_join("\n") }}
{% endif %} {% endif %}
{# TOC #} {# TOC #}

View File

@ -6,8 +6,9 @@
### {{ key }} ### {{ key }}
{% if item.description is defined and item.description %} {% if item.description is defined and item.description %}
{% set description = [item.description] if item.description is string else item.description %}
{{ item.description | map("replace", "\n\n", "\n") | safe_join("\n") }} {{ description | map("replace", "\n\n", "\n") | safe_join("\n") }}
{% endif %} {% endif %}
{% if item.value is defined and item.value %} {% if item.value is defined and item.value %}

View File

@ -3,8 +3,7 @@
[![Build Status](https://img.shields.io/drone/build/thegeeklab/ansible-doctor?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/ansible-doctor) [![Build Status](https://img.shields.io/drone/build/thegeeklab/ansible-doctor?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/ansible-doctor)
[![License: GPL-3.0](https://img.shields.io/github/license/thegeeklab/ansible-doctor)](https://github.com/thegeeklab/ansible-doctor/blob/main/LICENSE) [![License: GPL-3.0](https://img.shields.io/github/license/thegeeklab/ansible-doctor)](https://github.com/thegeeklab/ansible-doctor/blob/main/LICENSE)
Role to demonstrate ansible-doctor. It is also possible to overwrite Role to demonstrate ansible-doctor.
the default description with an annotation.
## Table of content ## Table of content

View File

@ -1,8 +1,4 @@
--- ---
# @meta description: >
# Role to demonstrate ansible-doctor. It is also possible to overwrite
# the default description with an annotation.
# @end
# @meta author: [John Doe](https\://blog.example.com) # @meta author: [John Doe](https\://blog.example.com)
galaxy_info: galaxy_info:
description: Role to demonstrate ansible-doctor. description: Role to demonstrate ansible-doctor.