Skip to content

Commit

Permalink
warn on abbreviations in names
Browse files Browse the repository at this point in the history
e.g. on a species "var."
  • Loading branch information
nleanba committed Mar 6, 2024
1 parent 800d645 commit 7355a24
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gg2rdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,12 @@ export function gg2rdf(
let nextRankLimit = "";

ranks.map((n: string) => {
if (taxon.getAttribute(n)) {
s.addProperty(`dwc:${n}`, STR(normalizeSpace(taxon.getAttribute(n))));
const attr = taxon.getAttribute(n);
if (attr) {
s.addProperty(`dwc:${n}`, STR(normalizeSpace(attr)));
if ((attr + "").includes(".")) {
s.addProperty("# Warning:", `abbreviated ${n} ${STR(attr)}`);
}
nextRankLimit = n;
}
});
Expand Down

0 comments on commit 7355a24

Please sign in to comment.