changedKeys method

Set<String> changedKeys(
  1. MarkdownDefinitions other
)

The lookup keys (as recording records them) whose answer differs between this and other.

Implementation

Set<String> changedKeys(MarkdownDefinitions other) {
  final changed = <String>{};
  for (final key in {..._links.keys, ...other._links.keys}) {
    if (_links[key] != other._links[key]) {
      changed.add('l:$key');
    }
  }
  for (final key in {..._footnotes.keys, ...other._footnotes.keys}) {
    if (_footnotes[key] != other._footnotes[key]) {
      changed.add('f:$key');
    }
  }
  return changed;
}