MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / escapeIndex

Function escapeIndex

src/render_latex.mjs:63–66  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

61 }
62}
63function escapeIndex(value) {
64 if (Array.isArray(value)) return value.map(escapeIndex).join("!")
65 return String(value).replace(/[&%$#_{}~^\\|!@]|-[ -=]/g, escapeIndexChar)
66}
67
68function escapeComplexScripts(string) {
69 return string.replace(/[^\u0000-\u0600→“”…←‘’]+/g, m => {

Callers 2

meta_indexseeFunction · 0.85
meta_indexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected