Closed jonathonherbert closed 4 years ago
Adds a 'before' and 'after' property to the Match interface, to allow our interface to programmatically reconstruct the context of a match.
Match
Before this, we had to manually parse out the matched text (example string: What a [misteak] to make), which was unreliable.
What a [misteak] to make
Run a check. before and after properties should be present in the match data when matches are made.
before
after
The automated tests cover this output, and should pass.
We're able to programmatically reconstruct the context of a match in tooling consuming our API, without parsing strings :)))
What does this change?
Adds a 'before' and 'after' property to the
Match
interface, to allow our interface to programmatically reconstruct the context of a match.Before this, we had to manually parse out the matched text (example string:
What a [misteak] to make
), which was unreliable.How to test
Run a check.
before
andafter
properties should be present in the match data when matches are made.The automated tests cover this output, and should pass.
How can we measure success?
We're able to programmatically reconstruct the context of a match in tooling consuming our API, without parsing strings :)))