-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replaceWith()
s keep.keepTags
not keeping tags when enabled
#1120
Labels
Comments
replaceWith()
s keep.keepTags
not functioning as expectedreplaceWith()
s keep.keepTags
not keeping tags when enabled
hey - you're right, this seems like a bug, to me. |
hey Frazer, i don't remember when the API changed for this, but the usage now is const doc = nlp('Worst-case Ontario, you get caught.')
doc.match('Ontario').replaceWith('scenario', { tags: true })
doc.debug() sorry for the delay, cheers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
The text was updated successfully, but these errors were encountered: