I made a small edit of the post https://stackoverflow.com/revisions/25855713/5 that showed steps and sub steps as html headers, and noticed that after my change the steps start to be shown as plain text, e.g. #Step 1 - Understanding Basic Authentication.
I decided that it was caused by my changes and reverted to previous revision 4 created in 2016. Unfortunately the formatting wasn’t restored.
I am guessing that since 2016 Stackexchange replaced its markdown interpreter and stopped recognise # without spaces before text as headers. In the markdown documentation https://daringfireball.net/projects/markdown/syntax#header space after hashes is shown, but not documented and some implementations enforce space, but other do not enforce.
I believe that old html was cached and showed headers correctly before I touched the post.
If my explanation is correct, it will be good to run convertion to update all old posts:
For lines starting with 1-6 hashes without spaces before the text to insert single space after the hashes to make backward compatible support of hash headers.
##headlines
without spaces after the hashes and other minor oversights. For these posts, we’ve built a tool that automatically fixes these well-known issues by changing a post’s Markdown source directly and re-rendering the HTML of the post in question.... it will be good to run convertion to update all old posts ...
. Part of the problem is that there are many ways to produce the same result as the hash, and different renderers for server side and user preview; along with the need for different scripts for different sections, posts, Tag excerpts, etc. --- that doesn't mean that we shouldn't do what we can, just that there will always be something missed and in need of repair (without ruining any inventive contortions the writer might have resorted to).