applyTo method
Applies this section's edits to text and returns the post-edit
result. Pure: does no I/O and does not validate the snapshot tag. The
HashlinePatcher owns tag validation; reach for this directly when
you've already validated the file content.
Implementation
HashlineApplyResult applyTo(String text) {
final parsed = parse();
final result = applyHashlineEdits(text, parsed.edits);
final merged = [...parsed.warnings, ...result.warnings];
return HashlineApplyResult(
text: result.text,
firstChangedLine: result.firstChangedLine,
warnings: merged,
);
}