Skip to content

Commit

Permalink
oops i broke everything
Browse files Browse the repository at this point in the history
  • Loading branch information
mi2ebi committed Dec 17, 2023
1 parent 5a95bc3 commit 13daec2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
9 changes: 0 additions & 9 deletions events.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,6 @@ id("search").addEventListener("input", function() {
createHTMLElement("a", {"href": "?q=" + encodeURIComponent(getConflictRegex(q)) + "&regex=tight"}, ["↑ find potential gismu conflicts?"])
]));
}
if (/^[CV*?(|)a-pr-vx-z' ]+$/.test(q)) {
try {
_ = new RegExp(
`^${h(q).replace(/C/g, "[bcdfgjklmnprstvxz]").replace(/V/g, "[aeiou]").replace(/\?/g, ".").replace(/\*+/g, ".*")}$`, "i"
);
} catch (e) {
id("info").append(createHTMLElement("p", null, ["invalid glob"]));
}
}
} else if (config["regex"]) {
// bad regex
try {
Expand Down
15 changes: 0 additions & 15 deletions worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,6 @@ function search(query) {
results.push([entry, 1]);
}
}
} else if (/^[CV*?(|)a-pr-vx-z' ]+$/.test(original)) {
// also stolen from lynn of lidysisku etc fame
var rgx;
try {
rgx = new RegExp(
`^${h(original).replace(/C/g, "[bcdfgjklmnprstvxz]").replace(/V/g, "[aeiou]").replace(/\?/g, ".").replace(/\*+/g, ".*")}$`, "i"
);
} catch {
return [];
}
for (const entry of jbo) {
if (rgx.test(entry.word)) {
results.push([entry, 9]);
}
}
} else if (/^[A-GI-PR-VX-Z][A-GhI-PR-VX-Zabc0-9*]*$/.test(original)) {
// TODO: make this work (issue #1)
} else {
Expand Down

0 comments on commit 13daec2

Please sign in to comment.