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

Potentially invalid emoji code (detect preceding alphanumeric character) #149

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

87flowers
Copy link

@87flowers 87flowers commented Sep 9, 2024

What

The intention seems to be to detect if there are any alphanumerics on either side of an emoji code. (See #129.)
However, the code as it is currently written only detects the case for alphanumerics after an emoji code.

In other words, the current behaviour is: (以前の動作:)

  x:e:x       ⇒  TEXT('x:e:x')
   :e:x       ⇒  TEXT(':e:x')
  x:e:        ⇒  TEXT('x'), EMOJI_CODE('e')

We change this behaviour as so: (新しい動作:)

  x:e:x       ⇒  TEXT('x:e:x')
   :e:x       ⇒  TEXT(':e:x')
  x:e:        ⇒  TEXT('x:e:')

Why

Example note text that would trigger this:

8:30: Breakfast
9:00: Presentation 
12:30: Lunch

Additional info (optional)

We also extract notRegexpBefore as it is a pattern seen elsewhere in the code.

If this is considered "not a bug" I am happy for this to be closed.

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.

1 participant