mgmeyers / obsidian-smart-typography

Converts quotes to curly quotes, dashes to em dashes, and periods to ellipses
GNU General Public License v3.0
238 stars 10 forks source link

Double quote bug on linux #44

Open kbdragon opened 1 year ago

kbdragon commented 1 year ago

Hi. Love the plugin, but I'm experiencing an issue when typing double quotation mark ( " ). Without the plugin, whenever I type the double quotation mark, Obsidian places both the opening mark and the closing pair. I type the text and type the double quotation mark again. Obsidian recognizes that a pair already exists and simply closes the quotation. With the plugin enabled, when I type the opening mark, Obsidian places both pairs and the plugin replaces it with the typographically appropriate form. BUT When I type the closing pair, I get a doubling of all marks. Instead of the app recognizing that the pair exists, I get a new set of opening and closing quotation marks. This makes the plugin pretty much unusable. I've experienced the issue on Solus and openSUSE with Gnome desktop. Video attached to demonstrate. Screencast from 2023-03-17 17-37-21.webm

System parameters: SYSTEM INFO: Obsidian version: v1.1.16 Installer version: v1.1.16 Operating system: #1 SMP PREEMPT_DYNAMIC Thu Mar 9 06:06:13 UTC 2023 (44ca817) 6.2.2-1-default Login status: logged in Catalyst license: supporter Insider build toggle: off Live preview: on Legacy editor: off Base theme: dark Community theme: none Snippets enabled: 0 Restricted mode: off Plugins installed: 52 Plugins enabled: 39 1: Admonition v9.2.1 2: Better Word Count v0.9.4 3: Book Search v0.5.9 4: Calendar v1.5.10 5: Citations v0.4.5 6: Contextual Typography v2.2.4 7: Hider v1.2.4 8: Kanban v1.5.2 9: Longform v2.0.3 10: Natural Language Dates v0.6.1 11: Obsidian Charts v3.7.1 12: Obsidian42 - BRAT v0.6.36 13: Periodic Notes v0.0.17 14: QuickAdd v0.11.5 15: Reading Time v1.1.1 16: RTL Support v1.1.0 17: Sortable v0.3.1 18: Zotero Integration v2.3.2 19: Omnisearch v1.12.2 20: Text Format v2.2.1 21: Tag Wrangler v0.5.6 22: Excel to Markdown Table v0.4.0 23: Advanced Tables v0.18.1 24: Markdown prettifier v0.1.3 25: Note Refactor v1.7.1 26: Projects v1.11.5 27: Outliner v4.2.1 28: Zoom v1.1.1 29: Markdown Formatting Assistant v0.4.1 30: LanguageTool Integration v0.3.3 31: File Tree Alternative Plugin v2.3.3 32: Dataview v0.5.55 33: Update time on edit v1.1.2 34: Smart Random Note v0.2.1 35: Remember cursor position v1.0.7 36: Quiet Outline v0.3.15 37: Editing Toolbar v2.3.1 38: Smart Typography v1.0.18 39: Media Extended v2.11.1

RECOMMENDATIONS:

Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
GrifVindh commented 1 year ago

This isn't just a linux bug, it also occurs on Windows 11. (I run on both and see the issue on both.) I assumed it was a quirk of the autoreplace feature, but if it's possible to resolve this to get it to act the way Obsidian handles it by default that would be outstanding.

kikujiro-mms commented 1 year ago

Mac too. Even an option not to add a closing quote when typing an opening one would help a lot. (Thank you!)

badcorporatelogo commented 5 months ago

@kikujiro-mms you can disable the auto-pairing feature from the settings:

image

hsandt commented 4 weeks ago

In 1.0.18 it still adds an extra unwanted quote, but not a full pair of quotes. Whether the extra unwanted quote is opening or closing depends on what's before.

Example (| means caret position): ‘test|’ -> ‘test’’ (2 closing quotes) ‘test with space ’ -> ‘test with space ‘’ (opening then closing quote)

I admit that detecting closing quote and replacing it, as in code editors, would be more convenient.