Sha256: 0000380121a950dd5c80775764bfe70cd45523612d85a58bfe6a31ab3e0aa38d
Contents?: true
Size: 490 Bytes
Versions: 7
Compression:
Stored size: 490 Bytes
Contents
import { htmlAttributes } from "../html/html-attributes"; export class Code { attributes: Record<string, any>; children: any[]; constructor(attributes: Record<string, any> = {}) { this.children = []; this.attributes = attributes; } get renderWrapper(): string { return `<code ${htmlAttributes(this.attributes)}>${this.children.map(child => child.renderWrapper).join("")}</code>`; } add(child: any): Code { this.children.push(child); return this; } }
Version data entries
7 entries across 7 versions & 1 rubygems