|
@ -278,22 +278,32 @@ function isMdAsciiPunct(ch) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Hepler to unify [reference labels].
|
|
|
|
|
|
//
|
|
|
|
|
|
function normalizeReference(str) { |
|
|
|
|
|
// use .toUpperCase() instead of .toLowerCase()
|
|
|
|
|
|
// here to avoid a conflict with Object.prototype
|
|
|
|
|
|
// members (most notably, `__proto__`)
|
|
|
|
|
|
return str.trim().replace(/\s+/g, ' ').toUpperCase(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
exports.assign = assign; |
|
|
exports.assign = assign; |
|
|
exports.isString = isString; |
|
|
exports.isString = isString; |
|
|
exports.has = has; |
|
|
exports.has = has; |
|
|
exports.unescapeMd = unescapeMd; |
|
|
exports.unescapeMd = unescapeMd; |
|
|
exports.isValidEntityCode = isValidEntityCode; |
|
|
exports.isValidEntityCode = isValidEntityCode; |
|
|
exports.fromCodePoint = fromCodePoint; |
|
|
exports.fromCodePoint = fromCodePoint; |
|
|
exports.replaceEntities = replaceEntities; |
|
|
exports.replaceEntities = replaceEntities; |
|
|
exports.escapeHtml = escapeHtml; |
|
|
exports.escapeHtml = escapeHtml; |
|
|
exports.arrayReplaceAt = arrayReplaceAt; |
|
|
exports.arrayReplaceAt = arrayReplaceAt; |
|
|
exports.normalizeLink = normalizeLink; |
|
|
exports.normalizeLink = normalizeLink; |
|
|
exports.isWhiteSpace = isWhiteSpace; |
|
|
exports.isWhiteSpace = isWhiteSpace; |
|
|
exports.isMdAsciiPunct = isMdAsciiPunct; |
|
|
exports.isMdAsciiPunct = isMdAsciiPunct; |
|
|
exports.isPunctChar = isPunctChar; |
|
|
exports.isPunctChar = isPunctChar; |
|
|
exports.escapeRE = escapeRE; |
|
|
exports.escapeRE = escapeRE; |
|
|
|
|
|
exports.normalizeReference = normalizeReference; |
|
|
|
|
|
|
|
|
// for testing only
|
|
|
// for testing only
|
|
|
exports.fixBrokenSurrogates = fixBrokenSurrogates; |
|
|
exports.fixBrokenSurrogates = fixBrokenSurrogates; |
|
|