question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

backtick insertion within current selected text, includes trailling whitespaces

See original GitHub issue

backtick 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 “the lazy 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:open
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fregantecommented, May 28, 2021

maybe its even a windows problem

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’.

your recording looks like I would expect it.

I think you’re referring to the word selection, because that’s the only different part — and Refined GitHub can’t change that.

0reactions
fregantecommented, Jun 1, 2021

You were onto something here! There’s an exception: \n

agif

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found