Skip to content

Commit

Permalink
fix: fixed whitespace chomping breaking some things
Browse files Browse the repository at this point in the history
  • Loading branch information
michalmela committed Sep 23, 2020
1 parent 5b000d2 commit b94fb74
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@
"description": "The name of the output markdown file",
"default": "asyncapi.adoc",
"required": false
},
"channelLabel": {
"description": "How you want to label the _Channels_ section (e.g. _Topics_ may make sense for MQTT)",
"default": "Channel",
"required": false
}
}
}
Expand Down
26 changes: 13 additions & 13 deletions partials/message.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@

{% macro message(msg) %}

// {% if msg.summary() -%}
// {% if msg.summary() %}
{{ msg.summary() }}
// {% endif -%}
// {% endif %}

// {%- if msg.description() -%}
// {% if msg.description() %}
{{ msg.description() | safe }}
// {% endif -%}
// {% endif %}

// {% if msg.headers() -%}
// {% if msg.headers() %}

====== {{msg.uid()}} headers
{{ schema(msg.headers(), 'Message Headers') }}

// {% if msg | getHeadersExamples %}

// {% for ex in msg | getHeadersExamples -%}
// {% for ex in msg | getHeadersExamples %}

.{{msg.uid()}} headers
====
```json
{{ ex | dump(2) | safe }}
```
====
// {% endfor -%}
// {% else -%}
// {% endfor %}
// {% else %}

.{{msg.uid()}} headers _(generated)_
====
Expand All @@ -38,7 +38,7 @@
// {% endif %}
// {% endif %}

// {% if msg.payload() -%}
// {% if msg.payload() %}

====== {{msg.uid()}} payload
{{ schema(msg.payload(), 'Message Payload') }}
Expand All @@ -53,16 +53,16 @@
{{ ex | dump(2) | safe }}
```
====
// {% endfor -%}
// {% else -%}
// {% endfor %}
// {% else %}

.{{msg.uid()}} payload _(generated)_
====
```json
{{ msg.payload().json() | generateExample | safe }}
```
// {% endif -%}
// {% endif -%}
// {% endif %}
// {% endif %}
====


Expand Down
6 changes: 3 additions & 3 deletions partials/operation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

{{ op.description() }}

// {% if op.hasMultipleMessages() -%}
// {% if op.hasMultipleMessages() %}
Accepts **one of** the following messages:

// {% for msg in op.messages() -%}
// {% for msg in op.messages() %}

===== Message `{{ msg.uid() }}`
{{ message(msg) }}

// {% endfor -%}
// {%- else -%}
// {%- else %}

===== Message

Expand Down

0 comments on commit b94fb74

Please sign in to comment.