Skip to content

Commit

Permalink
Merge pull request #16 from AljoschaMeyer/main
Browse files Browse the repository at this point in the history
Support highlighting via emoji in url
  • Loading branch information
AljoschaMeyer authored Aug 17, 2023
2 parents 51b38a4 + 740bd1c commit bdd95fe
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 bdd95fe

Please sign in to comment.