Auto pair brackets should not yield [[…]]'' or […](…)''

Steps to reproduce

With Auto pair brackets on, typing a single quote/apostrophe (') after a link (internal [[…]] or external […](…)) inserts a duplicated apostrophe.

I would argue that a single apostrophe should be inserted instead:

  1. This helps a lot with the common case of possessive “'s” (like in John’s), when the word before 's is in a link.
  2. A word is never directly followed by '…' anyway (without a space in-between), so inserting a double apostrophe is unhelpful in this case.

Did you follow the troubleshooting guide? Yes

Expected result

Typing ' after a link (external or internal) should insert a single apostrophe.

Actual result

Typing ' after a link instead inserts '' (when Auto pair brackets is on).

Environment

SYSTEM INFO:
Obsidian version: v1.3.5
Installer version: v1.3.5
Operating system: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103 22.5.0
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

2 Likes

Not what you want, but the workaround I use is to type an apostrophe from the keyboard rather than letting the OS and Obsidian manipulate the outcome of pressing the straight-quote keys.

On a Mac, the following all work without automatic pairing:


  • OPT ] for left (opening) single quotation mark

  • SHIFT OPT ] for right (closing) single quotation mark or apostrophe

  • OPT [ for left (opening) double quotation mark

  • SHIFT OPT [ for right (closing) double quotation mark


EDIT: Other OS platforms:

EDIT 2: Apologies. The above applies to English keyboards—I don’t know if it applies in other languages / with different keyboard layouts.

1 Like

Thanks for the idea.

There is a downside to using such “fancy” (typographically correct) apostrophes: if some Obsidian notes use the more common “programming” single quotes, searching text with apostrophes becomes cumbersome (as we don’t know which kind of apostrophe we should look for). It’s thus better to be consistent, and it’s easier to be consistent by using the usual single quotes. :slight_smile:

Hopefully it’s not too hard to not double ' right after a link, for the Obsidian wizards. :wink:

1 Like

This sounds like a good feature request and not a bug. Please, search/open one.

1 Like

Completely agree. :+1:

Would also be useful if Obsidian was apostrophe (diacritics in general) agnostic when searching, or at least had a toggle to be either agnostic or restrictive in the results it returns.

2 Likes

Done. Thanks for the tip.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.