Skip to content

Commit 45ae332

Browse files
dhritzkivbenvinegar
authored andcommitted
Remove unused escape functions in tracekit.js
1 parent f54870b commit 45ae332

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

vendor/TraceKit/tracekit.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -323,27 +323,6 @@ TraceKit.report = (function reportModuleWrapper() {
323323
*
324324
*/
325325
TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
326-
/**
327-
* Escapes special characters, except for whitespace, in a string to be
328-
* used inside a regular expression as a string literal.
329-
* @param {string} text The string.
330-
* @return {string} The escaped string literal.
331-
*/
332-
function escapeRegExp(text) {
333-
return text.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g, '\\$&');
334-
}
335-
336-
/**
337-
* Escapes special characters in a string to be used inside a regular
338-
* expression as a string literal. Also ensures that HTML entities will
339-
* be matched the same as their literal friends.
340-
* @param {string} body The string.
341-
* @return {string} The escaped string.
342-
*/
343-
function escapeCodeAsRegExpForMatchingInsideHTML(body) {
344-
return escapeRegExp(body).replace('<', '(?:<|&lt;)').replace('>', '(?:>|&gt;)').replace('&', '(?:&|&amp;)').replace('"', '(?:"|&quot;)').replace(/\s+/g, '\\s+');
345-
}
346-
347326
// Contents of Exception in various browsers.
348327
//
349328
// SAFARI:

0 commit comments

Comments
 (0)