Users report that auto-complete for hashtags fails when a hashtag is the first character on a new line, due to Markdown’s interpretation of # as a heading. Heather_Dudley notes this forces users to type hashtags on existing lines or guess paths for categories/tags. Remah explains this behavior stems from Markdown compatibility, where #text or # text denotes headings, and suggests adding a space before # as a workaround — which still renders correctly. sam acknowledges this is a quirk needing resolution but warns it’s tricky: to avoid interfering with heading syntax, autocomplete would need to trigger only after a second keystroke (e.g., after # + another character), introducing a new edge case. The issue highlights a tension between Markdown conventions and user experience for tag/category discovery.
When you start a hashtag to refer to another category or tag, if you start it as the first thing on a new line it does not bring up the autocomplete box. This is happening on my site, confirmed here on meta through screenshots below. This means that when I want to list categories one on each line, I have to first compose them on one line, then I hit enter.
I expect that occurs because the normal use of hash at the start of a line is for a heading …
… like this one
In markdown #text is a heading. Commonmark has a stricter specification of # text so it is possible that this is to maintain compatibility with older markdown.
To avoid the problem, which is not very common, I just put a space before the hash so autocomplete works.
If I mistakenly, out of habit, put the space before a heading then the heading will still work, e.g.:
Yeah this is a quirk we should sort out but it is a bit tricky
# this is a header
this is a header
So if we are to show autocomplete we need to only show it after the second key press so we don’t show it for #space, fixing this means we add another corner case.