Skip to content

Commit

Permalink
Support highlighting via emoji in url
Browse files Browse the repository at this point in the history
  • Loading branch information
AljoschaMeyer committed Aug 16, 2023
1 parent 51b38a4 commit 740bd1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ function get_highlighted_hours(url: URL): Set<number> {
} else {
const low = highlight_string.toLowerCase();
for (let i = 0; i < 24; i++) {
if (low === hourTable[i].shortName) {
if (
low === hourTable[i].shortName ||
low.startsWith(
hourTable[i].emoji
) /* also works when the emoji in the url is followed by \uFE0F */
) {
hours.add(i);
}
}
Expand Down

0 comments on commit 740bd1c

Please sign in to comment.