changesContent method
Whether this update changes the content of the concept as it stands
(current): changesConceptContent of current and of current
with this update's fields and body applied. KnowledgeWriter.prepare
decides with this whether the write records generated, on the
concept as it reads it.
Implementation
bool changesContent(OkfDocument current) {
final fields = Map.of(current.frontmatter);
for (final MapEntry(:key, :value) in frontmatter.entries) {
if (value == null) {
fields.remove(key);
} else {
fields[key] = value;
}
}
return changesConceptContent(
current,
current.copyWith(frontmatter: fields, body: body),
);
}