Skip to content

Commit c571a6c

Browse files
committed
Deal with trailing # in name
1 parent 5cb6a70 commit c571a6c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

bin/ucd_to_json.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function main() {
5252
if (true) {
5353
const allJsonPath = path.join(__dirname, "..", "tmp", "ucd.all.flat.json");
5454
console.log(`INFO: writing full JSON data to ${allJsonPath}`);
55-
fs.writeFile(
55+
await fs.writeFile(
5656
allJsonPath,
5757
JSON.stringify(jsonObj, null, 2),
5858
"utf-8"
@@ -161,6 +161,11 @@ async function main() {
161161
name = charData['name-alias'][0].alias;
162162
}
163163

164+
if (name.endsWith('#')) {
165+
name = name.slice(0, -1);
166+
name = name + charData.cp;
167+
}
168+
164169
var notes: string[] = [];
165170

166171
try {

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,13 +585,15 @@ async function main() {
585585
},
586586
headerFilter: "input",
587587
headerFilterFunc: filterName,
588-
headerPopup: `Use <code>^</code> to search at the beginning<br/>Use <code>/regex/</code> to search with a regular expression`,
588+
headerPopup: `Use <code>^</code> to search at the beginning<br/>
589+
Use <code>/regex/</code> to search with a regular expression<br/>
590+
Also searches Notes`,
589591
headerPopupIcon:
590592
'<span class="badge rounded-pill text-bg-primary">?</span>',
591593
width: 325,
592594
},
593595
{
594-
title: "Tags",
596+
title: "Notes & Tags",
595597
field: "tags",
596598
formatter: fmtTags,
597599
headerFilter: "input",

0 commit comments

Comments
 (0)