Skip to content

Commit f25cdf9

Browse files
committed
Include spelling variants for #123
1 parent 8094da3 commit f25cdf9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/convert/CW.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export class Entry {
172172
rw_indices,
173173
wn_domains,
174174
lemma,
175+
alt
175176
}) {
176177

177178
this.definition = definition;
@@ -238,9 +239,13 @@ export class Entry {
238239
throw new Error("Multiple stems in CW source");
239240
}
240241
const nonPossessive = (fststems.length > 0) ? fststems[0] : stems[0];
241-
const htmlInfo = `<table colspan=2><tr><td></td><td>Stem</td></tr><tr><td>Nonposs</td><td><strong>${nonPossessive}</strong></td></tr><tr><td>Poss</td><td><strong>${possessive}</strong></td></tr></table>`;
242+
const htmlInfo = `<p><table colspan=2><tr><td></td><td>Stem</td></tr><tr><td>Nonposs</td><td><strong>${nonPossessive}</strong></td></tr><tr><td>Poss</td><td><strong>${possessive}</strong></td></tr></table></p>`;
242243
this.htmlInfo = htmlInfo;
243244
}
245+
if (alt.length > 1) {
246+
this.htmlInfo ??= '';
247+
this.htmlInfo += `<p><table colspan=1><tr><td>Alternatives</td></tr>\n`+alt.map(entry => `<tr><td>${entry}</td></tr>`).join('\n')+`</table></p>`;
248+
}
244249
}
245250

246251
/**

lib/utilities/readToolbox.js

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export class ToolboxEntry {
5353
this.rw_domains = this.getLinesByType(`rw`);
5454
this.rw_indices = this.getLinesByType(`rw2`);
5555
this.wn_domains = this.getLinesByType(`wn`);
56+
this.alt = this.getLinesByType(`alt`);
5657
this.lemma = this.getLineByType(`lemma`);
5758
}
5859

0 commit comments

Comments
 (0)