This won't work when adding InlineStyleFeature using the register_rich_text_features wagtail hook.
Adding for example a generic inline style with a span will break it up as different string as if it was a block tag.
The best solution would be to retrieve the features from the richtext instance and follow all the InlineStyleFeature tags and attributes defined.
Currently the list of inline tags is hardcoded: https://github.com/wagtail/wagtail-localize/blob/main/wagtail_localize/strings.py#L9
This won't work when adding
InlineStyleFeature
using theregister_rich_text_features
wagtail hook. Adding for example a generic inline style with aspan
will break it up as different string as if it was a block tag.The best solution would be to retrieve the features from the richtext instance and follow all the
InlineStyleFeature
tags and attributes defined.