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