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

Update mark input/paste rules to tiptap v2 regular expressions #1964

Merged
merged 1 commit into from
Nov 27, 2021

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Nov 25, 2021

The most important change is that a mark is added only if you are at
the beginning of a block or there is a space before it.

This especially fixes accidently formatting parts of a string as italic
when it contains two underscores (often true in URLs or emoji names).

This change can be reverted when we migrated to tiptap v2, but it's
a low hanging fix for an annoying bug, and the tiptap v2 migration might
take a bit longer.

See Philipp Kuehns comment at https://discuss.prosemirror.net/t/4230/3.

  • Target version: master

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice!

It feels a bit weird when you want a sub part of a word to be bold. You type un**cann**y and it does not get formatted...
But I guess this is a very uncommon use case.

The most important change is that a mark is added only if you are at
the beginning of a block or there is a space before it.

This especially fixes accidently formatting parts of a string as italic
when it contains two underscores (often true in URLs or emoji names).

This change can be reverted when we migrated to tiptap v2, but it's
a low hanging fix for an annoying bug, and the tiptap v2 migration might
take a bit longer.

See Philipp Kuehns comment at https://discuss.prosemirror.net/t/4230/3.

Signed-off-by: Jonas Meurer <jonas@freesources.org>
@mejo- mejo- merged commit 74a721b into master Nov 27, 2021
@delete-merged-branch delete-merged-branch bot deleted the enh/update_mark_regexps branch November 27, 2021 17:50
@mejo-
Copy link
Member Author

mejo- commented Nov 27, 2021

This probably should also be backported to stable23 and stable22 at least, no? @juliushaertl

@juliusknorr
Copy link
Member

Yes, definitely.

@juliusknorr
Copy link
Member

/backport to stable23

@juliusknorr
Copy link
Member

/backport to stable22

@backportbot-nextcloud
Copy link

The backport to stable22 failed. Please do this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants