Skip to content

Commit 318d712

Browse files
committed
build: markdown description for metadata.yml [skip ci]
1 parent 1d5a8ef commit 318d712

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/app/metrics/metadata.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import yaml from "js-yaml"
44
import path from "path"
55
import url from "url"
66
import fetch from "node-fetch"
7+
import {marked} from "marked"
78

89
//Defined categories
910
const categories = ["core", "github", "social", "community"]
@@ -359,7 +360,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
359360
cell.push(`<b>allowed values:</b><ul>${o.values.map(value => `<li>${value}</li>`).join("")}</ul>`)
360361
return ` <tr>
361362
<td nowrap="nowrap"><code>${option}</code></td>
362-
<td rowspan="2">${description}<img width="900" height="1" alt=""></td>
363+
<td rowspan="2">${marked.parse(description, {silent:true})}<img width="900" height="1" alt=""></td>
363364
</tr>
364365
<tr>
365366
<td nowrap="nowrap">${cell.join("\n")}</td>
@@ -379,6 +380,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
379380
return meta
380381
}
381382
catch (error) {
383+
console.warn(error)
382384
logger(`metrics/metadata > failed to load plugin ${name}: ${error}`)
383385
return null
384386
}

0 commit comments

Comments
 (0)