Skip to content
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

Bad interaction between Italic Extension and mentions plugin #215

Closed
1 task done
benjie opened this issue Feb 6, 2020 · 1 comment · Fixed by #662
Closed
1 task done

Bad interaction between Italic Extension and mentions plugin #215

benjie opened this issue Feb 6, 2020 · 1 comment · Fixed by #662
Assignees
Labels
package: remirror 🟣 Label for the remirror package and all relevant scoped `@remirror/*` packages. type: bug 🪲 Something isn't working

Comments

@benjie
Copy link
Member

benjie commented Feb 6, 2020

Description

Easiest way to reproduce:

1/ Edit fake-users.ts so one of the usernames contains an underscore, e.g. change purplebird177 to purple_bird177:

username: 'purplebird177',

2/ yarn build

3/ Run the Next example: cd examples/with-next && yarn dev

4/ visit http://localhost:3000/editor/rich-social

5/ Auto-complete @purple_bird177 (note the underscore) and then press *

Expected: text should read @purple_bird177 *

Actual: text reads @purplbird177

This is with the rich editor but you can reproduce it with just the ItalicExtension:

  const extensions = useMemo(() => {
    return [{ extension: new ItalicExtension(), priority: 2 }];
  }, []);

GIF:

Peek 2020-02-06 13-05

Possible Fix

Don't have italic markdown match in the middle of words. I.e. the following should not match an underscore for italic purposes:

  • @_user
  • @user_name
  • user_name
  • https://website.com/web_page

I think it should also not match "special" text like links, mentions, tags; so the following should also not match for italic purposes:

  • @user_
  • @__xuorig__
  • #tag_
  • http://site.com/_

Checklist

@ifiokjr
Copy link
Member

ifiokjr commented Mar 10, 2020

This still needs to be addressed. Again, I'll add a failing test case and then create a fix.

@ifiokjr ifiokjr modified the milestone: Next Aug 10, 2020
@ifiokjr ifiokjr added this to To do in remirror@1.0.0 Aug 11, 2020
@ifiokjr ifiokjr added this to Low priority in Bugs Aug 12, 2020
@ifiokjr ifiokjr removed this from To do in remirror@1.0.0 Aug 12, 2020
@ifiokjr ifiokjr added this to October: 2020-10-04 in Internal Roadmap Aug 13, 2020
@ifiokjr ifiokjr moved this from October: 2020-10-04 to September: 2020-09-06 in Internal Roadmap Aug 13, 2020
@ifiokjr ifiokjr moved this from September: 2020-09-06 to August: 2020-08-09 (Week) in Internal Roadmap Aug 13, 2020
@ifiokjr ifiokjr added this to the fix outstanding bugs milestone Aug 15, 2020
@ifiokjr ifiokjr moved this from Low priority to Default Priority in Bugs Aug 15, 2020
@ifiokjr ifiokjr moved this from August: 2020-08-15 (W) to August: 2020-08-22 (Week) in Internal Roadmap Aug 15, 2020
@ifiokjr ifiokjr self-assigned this Aug 15, 2020
@ifiokjr ifiokjr added the package: remirror 🟣 Label for the remirror package and all relevant scoped `@remirror/*` packages. label Aug 15, 2020
@ifiokjr ifiokjr modified the milestones: Bug Cleanup, Playground Aug 16, 2020
@ifiokjr ifiokjr added this to To do in remirror@1.0.0 via automation Aug 16, 2020
@ifiokjr ifiokjr moved this from August: 2020-08-22 (Week) to August: 2020-08-29 (Week) in Internal Roadmap Aug 18, 2020
@ifiokjr ifiokjr modified the milestones: Playground, Suggestions Aug 29, 2020
ifiokjr added a commit that referenced this issue Aug 31, 2020
Add support for creating mentions as uneditable nodes - Fixes #402
Refactor and simplify `prosemirror-suggest`API - Fixes #548
Create new package `@remirror/react-hooks` for all core hooks - Fixes #394
Support adding extra attributes selected by `tags` - Fixes #463
Remove keybindings from `createSuggesters` method Fixes - #578
Add option to disable input rules while inside an active suggestion #547
Bad interaction between Italic Extension and mentions plugin #215
Add support for matches with whitespace to `prosemirror-suggest` #353

Closes #433
ifiokjr added a commit that referenced this issue Aug 31, 2020
Add support for creating mentions as uneditable nodes - Fixes #402
Refactor and simplify `prosemirror-suggest`API - Fixes #548
Create new package `@remirror/react-hooks` for all core hooks - Fixes #394
Support adding extra attributes selected by `tags` - Fixes #463
Remove keybindings from `createSuggesters` method Fixes - #578
Add option to disable input rules while inside an active suggestion #547
Bad interaction between Italic Extension and mentions plugin #215
Add support for matches with whitespace to `prosemirror-suggest` #353

Closes #433
@ifiokjr ifiokjr moved this from To do to In progress in remirror@1.0.0 Sep 6, 2020
@ifiokjr ifiokjr moved this from In progress to Ready in remirror@1.0.0 Sep 6, 2020
@ifiokjr ifiokjr moved this from September: 2020-09-13 (Week) to September: 2020-09-06 (Week) in Internal Roadmap Sep 6, 2020
@ifiokjr ifiokjr moved this from Default Priority to Ready in Bugs Sep 6, 2020
ifiokjr added a commit that referenced this issue Sep 7, 2020
remirror@1.0.0 automation moved this from Ready to Done Sep 7, 2020
Bugs automation moved this from Ready to Closed Sep 7, 2020
Internal Roadmap automation moved this from September: 2020-09-06 (Week) to Released Sep 7, 2020
ifiokjr added a commit that referenced this issue Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: remirror 🟣 Label for the remirror package and all relevant scoped `@remirror/*` packages. type: bug 🪲 Something isn't working
Projects
Bugs
  
Closed
Internal Roadmap
  
Released
Development

Successfully merging a pull request may close this issue.

2 participants