MCPcopy Index your code
hub / github.com/josdejong/mathjs / _toHTML

Method _toHTML

src/expression/node/ObjectNode.js:170–184  ·  view source on GitHub ↗

* Get HTML representation * @param {Object} options * @return {string} str * @override

(options)

Source from the content-addressed store, hash-verified

168 * @override
169 */
170 _toHTML (options) {
171 const entries = []
172 for (const key in this.properties) {
173 if (hasOwnProperty(this.properties, key)) {
174 entries.push(
175 '<span class="math-symbol math-property">' + escape(key) + '</span>' +
176 '<span class="math-operator math-assignment-operator ' +
177 'math-property-assignment-operator math-binary-operator">' +
178 ':</span>' + this.properties[key].toHTML(options))
179 }
180 }
181 return '<span class="math-parenthesis math-curly-parenthesis">{</span>' +
182 entries.join('<span class="math-separator">,</span>') +
183 '<span class="math-parenthesis math-curly-parenthesis">}</span>'
184 }
185
186 /**
187 * Get LaTeX representation

Callers

nothing calls this directly

Calls 3

hasOwnPropertyFunction · 0.90
escapeFunction · 0.90
toHTMLMethod · 0.65

Tested by

no test coverage detected