Skip to content

2.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 14:26
8f30165

Integrated the new wordstreamer module so that any RegexPattern is also a valid wordstreamer.Renderable, and respect_priority is now a thin wrapper around wordstreamer.Renderable.respect_priority.

This means several things:

  • Any wordstreamer-compatible module can now seamlessly render any rgx entity using a common API
  • [Breaking change] RegexPattern.render now accepts a second argument context: Context
  • [Breaking change] RegexPattern.render now returns wordstreamer.TokenStream. This doesn't change much at the moment, but there is a possibility that wordstreamer.Marker would be used alongside strings later.
  • respect_priority can now be defined on the pattern object, as well as custom wrapping and comparing logic. The default behaviour stays the same.
  • Many potential improvements will be much easier to implement in the future, without any breaking changes