typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.54k stars 56 forks source link

"Auto pair common Markdown syntax" not working for dead backtick (`` ` ``) key on Ubuntu #6027

Open LinqLover opened 7 months ago

LinqLover commented 7 months ago

Describe the bug On Ubuntu with a German keyboard layout (Qwertz), I cannot type a grave accent (`) while selecting some text to wrap it into a code block.

To Reproduce Steps to reproduce the behavior:

  1. Type abc
  2. Select it
  3. Type dead backtick on Ubuntu Qwertz keyboard:
    • either Shift + ´ , Shift + ´
    • or Shift + ´ , Space

Expected behavior `abc`

Actual behavior `

Desktop (please complete the following information):

Typora Version e.g: 1.8.10

Additional context For reference, VS Code handles both input versions exactly as I would expect it.

Not sure what's the proper way to implement this, but from my black-box perspective I think U+0300 COMBINING GRAVIS ACCENT character should be handled in a similar way to U+0060, but this might need to be honored for the next keyboard input. Also consider special cases like pressing Shift + ´ , a while the text is selected, which like in VS Code should replace the prior selection by a single à.

abnerlee commented 6 months ago

This option requires a restart of Typora to apply. Does this happens in new Typora window or after you restart Typora?