backtick insertion within current selected text, includes trailling whitespaces
See original GitHub issuebacktick insertion of a current selected text, includes trailling whitespaces, which it shouldn’t
repro
- while editing/creating a issue double click a word
- the double-clicked word get selected (including the trailling whitespace behind the word)
- press the backtick-key and refined github will sorround the selected word with backticks (including trailing whitespace)
example:
- a issue contains the text “the lazy fox jumps over…”
- double click the word ‘lazy’
- press the backtick-key
- the resulting markup is “the
lazy
fox jumps over…” while it should be “thelazy
fox jumps over…” (spot the positions of the backticks)
reproduced in firefox 90a1 on windows10x64, with refined github 21.5.19. also reproducible on chrome 93.0.4525.0 on the same machine
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Template literals (Template strings) - JavaScript | MDN
Template literals are enclosed by backtick ( ` ) characters instead of double or single quotes. Along with having normal strings, template ...
Read more >Leading and trailing white spaces in code blocks - Spec
A backtick string is a string of one or more backtick characters (" ` " U+0060 GRAVE ACCENT) that is neither preceded nor...
Read more >What's the simplest way to strip trailing whitespace from all ...
Use a keybinding to strip all trailing whitespace ... The winsaveview() will save the current "view", which includes the cursor position, ...
Read more >WSL - Trailing whitespaces being added to Bash code pasted ...
As you stated, the issue arises from pasting text in a narrow window with Unix line-endings (LF). Consider using the following AutoHotkey ...
Read more >Do not remove trailing spaces in inline code
This behavior is required by the original Markdown rules: The backtick delimiters surrounding a code span may include spaces — one after the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Selecting the trailing whitespace appears to be a Windows behavior; Wrapping the exact selection is universal: Not a Refined GitHub problem, not GitHub’s, not Chrome’s, not Windows’.
I think you’re referring to the word selection, because that’s the only different part — and Refined GitHub can’t change that.
You were onto something here! There’s an exception:
\n
This feature however is handled by https://github.com/fregante/text-field-edit so any changes should be pushed to that repo. It’s a little tricky because this changes the selection as well.