UNPKG

@gouvfr/dsfr-roller

Version:

Le module `dsfr-roller` permet de publier le site de documentation du Système de Design de l’État - DSFR

22 lines (16 loc) 430 B
import { Node } from '../node.js'; import { convertHTMLEntities } from '@gouvfr/dsfr-kit'; class InlineCodeNode extends Node { constructor (data) { super(data); this._value = data.value; } get value () { return this._value } async render () { return `<code class="dsfr-doc-inline-code">${convertHTMLEntities(this.value)}</code>`; } } InlineCodeNode.TYPE = 'inlineCode'; export { InlineCodeNode };