Skip to content

Commit 450767d

Browse files
committed
Codepoint sort
1 parent c00f865 commit 450767d

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33

44
A web app for searching and browsing the Unicode character database.
55

6-
See it in action: [unicodesear.ch](https://unicodesear.ch)
6+
See it in action: [unicodesearch.org](https://www.unicodesearch.org/)
7+
8+
## Links
9+
10+
- [Unicode Character Database](https://www.unicode.org/Public/17.0.0/ucd/) - XML data source for this app.
11+
- [Unicode Annex #42](https://www.unicode.org/reports/tr42/) - what the fields in the UCD mean.
712

813
## Credits
914

@@ -21,11 +26,9 @@ See it in action: [unicodesear.ch](https://unicodesear.ch)
2126

2227
## To Do
2328

24-
- [ ] name sort not working
2529
- [ ] numeric search for codepoints
2630
- [ ] codepoint sort should be numeric
2731
- [ ] preview column (SVGs)
28-
- [ ] preview column (font)
2932
- [ ] copy to clipboard button
3033
- [ ] test dark mode
3134
- [ ] share links in footer

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ async function main() {
247247
headerHozAlign: "center",
248248
hozAlign: "center",
249249
responsive: 2,
250+
sorter: function(a, b, aRow, bRow, column, dir, sorterParams) {
251+
const aInt = parseInt(a, 16);
252+
const bInt = parseInt(b, 16);
253+
return aInt - bInt;
254+
},
250255
title: "Codepoint",
251256
width: 175,
252257
},

0 commit comments

Comments
 (0)