Skip to content

Commit c98505d

Browse files
authored
fix: Support for empty payload and mailto attribute for contact email (#84)
1 parent 11eb2b0 commit c98505d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

partials/introduction.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1>{{asyncapi.info().title()}} {{asyncapi.info().version()}}</h1>
2525
{% endif %}
2626
{% if asyncapi.info().contact().email() %}
2727
Contact email: <a class="border border-solid border-purple-lighter hover:bg-purple-lighter hover:text-purple-dark font-bold no-underline text-purple text-xs uppercase rounded mr-2 px-3 py-1"
28-
href="{{asyncapi.info().contact().email()}}" target="_blank">{{asyncapi.info().contact().email()}}</a>
28+
href="mailto:{{asyncapi.info().contact().email()}}" target="_blank">{{asyncapi.info().contact().email()}}</a>
2929
{% endif %}
3030
{% endif %}
3131
</div>

partials/message.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
{{ tags(msg.tags()) }}
2121

2222
<div class="mt-4 mb-4 markdown">{{ msg.description() | markdown2html | safe }}</div>
23-
{{ schema(msg.payload(), 'Payload', open=open) }}
23+
{% if msg.payload() %}
24+
{{ schema(msg.payload(), 'Payload', open=open) }}
25+
{% endif %}
2426
{% if msg.headers() %}
2527
<div class="mt-4">
2628
{{ schema(msg.headers(), 'Headers', open=open) }}

0 commit comments

Comments
 (0)