Indented text, like the following:
#test
is considered a code block in Markdown.
In other words, you are trying to create an indented list but are indenting the list too early.
The following text renders problematically, as you’ve described:
# Test header
- #Test
…becomes:
Test header
- #Test
But this:
# Test header
- #Test
…renders correctly:
Test header
Note that the behaviour is the same here in Discourse. Markdown is a funny thing sometimes, sadly!