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

feat: matching punctuation #791

Merged
merged 4 commits into from
Dec 20, 2022
Merged

feat: matching punctuation #791

merged 4 commits into from
Dec 20, 2022

Conversation

Zeng1998
Copy link
Contributor

No description provided.

@render
Copy link

render bot commented Dec 20, 2022

Your Render PR Server URL is https://memos-pr-791.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-cegmokh4reb38ce702ng.

@jxpsert
Copy link
Contributor

jxpsert commented Dec 20, 2022

Suggestion: if the "", () or whatever is empty, and you press backspace on the first (, delete both?
Don't know how doable that is.

Here's what I mean (in VSCode, ignore the Copilot suggestion)
example

@Zeng1998
Copy link
Contributor Author

Yes, I know what you mean.

I am looking for a solution that is not too complicated. If you have some good suggestions, please let me know.

@jxpsert
Copy link
Contributor

jxpsert commented Dec 20, 2022

Perhaps;

  • Find index of last deleted character
  • If character is in the array:
  • Find index of the first corresponding character (deleted character was (: look for )) after the deleted character
  • Delete character at found index

@jxpsert
Copy link
Contributor

jxpsert commented Dec 20, 2022

Looks good to me now. Now it's waiting for codeowners.

Co-authored-by: boojack <stevenlgtm@gmail.com>
Copy link
Collaborator

@boojack boojack left a comment

Choose a reason for hiding this comment

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

LGTM

@boojack boojack merged commit b7df1f5 into main Dec 20, 2022
@boojack boojack deleted the feat/auto_matching_punctuation branch December 23, 2022 06:02
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.

4 participants