Skip to content

Commit

Permalink
fixes #468 - add markdown support for array description in schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mrin9 committed May 2, 2021
1 parent a7c70ec commit 52a9eee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/schema-table.js
Expand Up @@ -252,7 +252,7 @@ export default class SchemaTable extends LitElement {
${dataType === 'array' ? `[${type}]` : type}
<span style="font-family: var(--font-mono);">${readorWriteOnly} </span> </div>
<div class='td key-descr'>
${dataType === 'array' ? description : ''}
${dataType === 'array' ? html`<span class="m-markdown-small">${unsafeHTML(marked(description))}</span>` : ''}
${constraint ? html`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Constraints: </span> ${constraint}</div>` : ''}
${defaultValue ? html`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Default: </span>${defaultValue}</div>` : ''}
${allowedValues ? html`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Allowed: </span>${allowedValues}</div>` : ''}
Expand Down
2 changes: 1 addition & 1 deletion src/components/schema-tree.js
Expand Up @@ -260,7 +260,7 @@ export default class SchemaTree extends LitElement {
</span>
</div>
<div class='td key-descr'>
${dataType === 'array' ? description : ''}
${dataType === 'array' ? html`<span class="m-markdown-small">${unsafeHTML(marked(description))}</span>` : ''}
${constraint ? html`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Constraints: </span>${constraint}</div>` : ''}
${defaultValue ? html`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Default: </span>${defaultValue}</div>` : ''}
${allowedValues ? html`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Allowed: </span>${allowedValues}</div>` : ''}
Expand Down

0 comments on commit 52a9eee

Please sign in to comment.