Auto-complete with hashtag doesn't activate when hashtag is first character on a new line

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.

They appropriately render, mind you:


But if I don’t know the path for a subcategory or a tag, I have to guess or compose on a previous line to get the correct path.

Example here, with other characters first:

Newline, hashtag first:


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.:

hash prefixed by space



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.