Closed Fdawgs closed 3 months ago
hey - you're right, this seems like a bug, to me. Will put it on the pile! cheers
hey Frazer, i don't remember when the API changed for this, but the usage now is { tags: true }
:
const doc = nlp('Worst-case Ontario, you get caught.')
doc.match('Ontario').replaceWith('scenario', { tags: true })
doc.debug()
sorry for the delay, cheers
Node version: 22.2.0 Compromise version: 14.13.0
Using
replaceWith
, with thekeep.keepTags
param property set to true, I would expect it to retain tags as documented.Example: