sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
423 stars 182 forks source link

fix: replace correct range for marker input rules #491

Closed raphael-inglin-ergon closed 9 months ago

raphael-inglin-ergon commented 9 months ago

This PR contains:

Breaking Changes?

Checklist

Describe Your Changes

Does this PR affects any existing issues?

fixes #490

sibiraj-s commented 9 months ago

Hi, Thanks for the PR, the changes looks good, but its a breaking change. helps can be accessed via ngx-editor/helpers. Not sure if anyone is using it, don't want to break if someone uses it.

is it okay if I push some changes to your branch and you can test that out? I think this broke when I was fixing some eslint rule prefere-named-capture-group

raphael-inglin-ergon commented 9 months ago

Ah I didn't realize it was usable from the outside, my bad. Sure knock yourself out. You can probably make it non-breaking, if you use the original index (.i.e 2 instead of 1) and add an additional capturing group somewhere.

sibiraj-s commented 9 months ago

Hi @raphael-inglin-ergon . Yeah I didn't document the helpers better. but who knows.

And, I have pushed the changes to your branch, which updated the same PR. This retains the original logic, but also fixes a bug where whitespace infront of marks is removed when the rule is applied. Can you test it once?

github-actions[bot] commented 8 months ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.