MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / regexEqual

Function regexEqual

static/js/codemirror/keymap/vim.js:2026–2038  ·  view source on GitHub ↗
(r1, r2)

Source from the content-addressed store, hash-verified

2024 initialValue);
2025 }
2026 function regexEqual(r1, r2) {
2027 if (r1 instanceof RegExp && r2 instanceof RegExp) {
2028 var props = ["global", "multiline", "ignoreCase", "source"];
2029 for (var i = 0; i < props.length; i++) {
2030 var prop = props[i];
2031 if (r1[prop] !== r2[prop]) {
2032 return(false);
2033 }
2034 }
2035 return(true);
2036 }
2037 return(false);
2038 }
2039 function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {
2040 cm.operation(function() {
2041 var state = getSearchState(cm);

Callers 1

updateSearchQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected