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

changed textarea backtick wrapping to only act on selections #313

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

asdfzdfj
Copy link
Contributor

@asdfzdfj asdfzdfj commented Nov 28, 2023

NOTE: this change is largely due to my personal opinion. if it also works out for you then great. if not, feel free to leave some suggestions

  • changed the backtick button in comment box to only add enclosing backticks on selected text, as I find the current behavior (just giving a pair of possibly empty backticks whenever) utterly irritating especially when trying to type a fenced code block
  • activates the selection wrapping for single/double quote, and tilde
  • activates the selection wrapping for underscore and asterisk, but it will cycle between 0,1,2 wrapping characters
    like this: word -> *word* -> **word** -> word -> ...

e-five256
e-five256 previously approved these changes Nov 28, 2023
Copy link
Member

@e-five256 e-five256 left a comment

Choose a reason for hiding this comment

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

I'm also fine with going with this as-is, it's nice to be able to type ``` again

- changed the backtick button in comment box to only add enclosing
  backticks on selected text, as I find the current behavior utterly
  irritating especially when trying to type a fenced code block

- activates the selection wrapping for single/double quote, and tilde

- activates the selection wrapping for underscore and asterisk, but it
  will cycle between 0,1,2 wrapping characters
  like this: `word` -> `*word*` -> `**word**` -> `word` -> ...
Copy link
Member

@e-five256 e-five256 left a comment

Choose a reason for hiding this comment

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

in firefox, this seems to be working fine, in my chromium browser, selecting via keyboard is fine, selecting via click and dragging is fine, but if I double click on a word for some reason it deletes 1 character to the left as well and changes the selection area. I don't think that's a reason to hold this up as it seems like an improvement overall, and it's possible chromium doesn't correctly mimic google chrome anyways

@asdfzdfj asdfzdfj merged commit f82241d into MbinOrg:main Nov 29, 2023
7 checks passed
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.

None yet

2 participants