exemptFrom method

bool exemptFrom(
  1. String term
)

Whether this key is excused from enforcing term — by a blanket exemption or by naming it. Term matching is case-insensitive, since the glossary's canonical lemma may be capitalized differently from the exemption a human typed.

Implementation

bool exemptFrom(String term) {
  if (glossaryExempt) return true;
  if (glossaryExemptTerms.isEmpty) return false;
  final needle = term.toLowerCase();
  return glossaryExemptTerms.any((t) => t.toLowerCase() == needle);
}