Skip to content

Commit

Permalink
fix(glossarist-ruby): handle abbreviations
Browse files Browse the repository at this point in the history
  • Loading branch information
strogonoff committed Dec 14, 2023
1 parent 3400f98 commit 7a927df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/glossarist-gem/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,14 @@ function parseLocalizedConcept(
normative_status: t.normative_status as Designation["normative_status"],
designation: t.designation as Designation["designation"],
};
if (t.type === 'expression') {
if (t.type === 'expression' || t.type === 'abbreviation') {
const term: Expression = {
type: 'expression',
partOfSpeech: t.adj ? 'adjective' : t.adverb ? 'adverb' : t.noun ? 'noun' : t.verb ? 'verb' : undefined,
isParticiple: t.participle,
};
if (t.type === 'abbreviation') {
term.isAbbreviation = true;
}
const result: Designation = { ...designationBase, ...term };
return result;
Expand Down

0 comments on commit 7a927df

Please sign in to comment.