Make 'auto pair markdown' compatible with bullet lists (Quality of Life)

Steps to reproduce

  1. Have autopair markdown syntax turned on.
  2. On a new line, hit * character and make a bullet list item, e.g. * item

Expected result

Bullet list:
* item

Expected behavior: When user hits * at the start of a line, auto pair generates a closing * character after the cursor (assuming intent to create an italic). Then after user hits space (indicating intent to make a bullet item, not italic), the second * is deleted and the line is formatted as a bullet item.

Screen capture from Typora for expected reference:
bullet bug 2

Actual result

Bullet list:
* item*

bullet bug

Editor’s auto pair logic doesn’t catch user intent to make a bullet list instead of an italic. Extra character is generated and has to be deleted manually.

Pattern matching on * followed by a space at the beginning of a line is the ‘bullet list intent’. That distinguishes it from the intent to start a line with an italic word.

Environment

  • Operating system: MacOS 10.15.6
  • Obsidian version: 0.8.14

Additional information

The issue was reported as a bug below in May but never turned into a feature request. Still seems like an open UI/UX issue that would increase Quality of Life so I am reporting here for further discussion.

6 Likes

I can absolutely second this! I love auto pair for internal links, but also love bullet lists. So the Typora-Like proposal is great. An (hidden) option for which things should be auto-paired would be fine too.

1 Like

Current workaround:

From my hand-writing I adopted - hyphens instead of * asterisks as list-item marks so I do not have this issue.
It is also consistent with YAML format used in YAML-header.

1 Like

Ran into this very quickly as a new user 3 years later! :slight_smile:

Five years after the first report of the problem in the forum have passed. Can we please get a response if it is planned to be fixed? A lot of people is using asterisk for unordered lists in Markdown. When shown in text, asterisks make nicely visible marks.

There is a pretty good idea what the fix of the “Auto-pair Markdown syntax” feature should do. When the typed text on a line matches the regex shown below, then the auto-pair change should be reverted and the second (automatically inserted) asterisk should be removed.

^\s*\*\s