@arcgis/coding-components
Version:
ArcGIS Coding Components
23 lines (22 loc) • 641 B
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
import { marked as n } from "marked";
n.use({
gfm: !0,
breaks: !0,
async: !1,
renderer: {
link({ href: e, title: r, tokens: i }) {
const t = this.parser.parseInline(i);
return `<calcite-link href="${e}" title="${r ?? t}" target="Arcade Help">${t}</calcite-link>`;
},
code({ lang: e, text: r }) {
return `<arcgis-code-viewer language="${e === "sql" ? "arcgis-sql-expression" : e}">${r}</arcgis-code-viewer>`;
}
}
});
function c(e) {
return e == null ? "" : n.parse(typeof e == "string" ? e : e.value, { async: !1 });
}
export {
c
};