MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Anchor

Class Anchor

static/katex/katex.mjs:1117–1147  ·  view source on GitHub ↗

* This node represents an anchor ( ) element with a hyperlink. See `span` * for further details.

Source from the content-addressed store, hash-verified

1115 */
1116
1117class Anchor {
1118 constructor(href, classes, children, options) {
1119 this.children = void 0;
1120 this.attributes = void 0;
1121 this.classes = void 0;
1122 this.height = void 0;
1123 this.depth = void 0;
1124 this.maxFontSize = void 0;
1125 this.style = void 0;
1126 initNode.call(this, classes, options);
1127 this.children = children || [];
1128 this.setAttribute('href', href);
1129 }
1130
1131 setAttribute(attribute, value) {
1132 this.attributes[attribute] = value;
1133 }
1134
1135 hasClass(className) {
1136 return utils.contains(this.classes, className);
1137 }
1138
1139 toNode() {
1140 return toNode.call(this, "a");
1141 }
1142
1143 toMarkup() {
1144 return toMarkup.call(this, "a");
1145 }
1146
1147}
1148const iCombinations = {
1149 'î': '\u0131\u0302',
1150 'ï': '\u0131\u0308',

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected