Code change:
! H1 and H2 are not highlighted. The preview is fine. Tested on VS Code 1.3.1 on OS X 10.11.6
I wanna give this one a try. Here is what I have achieved so far. !
Couple of updates on this: to highlight both lines at the same time, the way I was trying above doesn't look practical. It automatically highlights the current line assuming a match of the begin, until it finds a non matching end/while (Basically the line highlights, and if the next line isn't a '-{3,}' then the syntax goes back to normal mode. alt heading 2 syntax (just the -{3,} part) is conflicting with the rule meta.separator.markdown, which takes precedence and hence the issue. Would it be a better option to fix this conflict instead?
It doesn't work with 1.9.0 !
I believe this is as designed. Getting the TM grammar to highlight both the lines is tricky. If you refer to my previous comment, the first point: This would be confusing for the user. In simple terms, it means that as soon as a user starts typing, the line highlights, and goes back to normal syntax if the next line is neither of the alternate H1/H2 (---/===) text. What do you think?
Is it possible to let the line white and if a line starts with --- oder ===, then this one and the previous one switch to blue? That is the same behavior like in other editors.

Related discussion:
text: } }, { <ins> "c": "###", "t": "${1/(#)(#)?(#)?(#)?(#)?(#)?/${6:?6:${5:?5:${4:?4:${3:?3:${2:?2:1}}}}}/}.definition.heading.markdown.markup.punctuation", "r": { "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" } }, { "c": " ", "t": "${1/(#)(#)?(#)?(#)?(#)?(#)?/${6:?6:${5:?5:${4:?4:${3:?3:${2:?2:1}}}}}/}.heading.markdown.markup", "r": { "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" } }, { "c": "Alternate heading styles:", "t": "${1/(#)(#)?(#)?(#)?(#)?(#)?/${6:?6:${5:?5:${4:?4:${3:?3:${2:?2:1}}}}}/}.entity.heading.markdown.markup.name.section", "r": { "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" } }, { "c": "Alternate Header 1", "t": "markdown.meta.paragraph", "r": { "dark_plus": ".vs-dark .token rgb(212, 212, 212)", "light_plus": ".vs .token rgb(0, 0, 0)", "dark_vs": ".vs-dark .token rgb(212, 212, 212)", "light_vs": ".vs .token rgb(0, 0, 0)", "hc_black": ".hc-black .token rgb(255, 255, 255)" } }, { "c": "==================", "t": "1.heading.markdown.markup.meta.paragraph.setext", "r": { "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" } }, { "c": "Alternate Header 2", "t": "markdown.meta.paragraph", "r": { "dark_plus": ".vs-dark .token rgb(212, 212, 212)", "light_plus": ".vs .token rgb(0, 0, 0)", "dark_vs": ".vs-dark .token rgb(212, 212, 212)", "light_vs": ".vs .token rgb(0, 0, 0)", "hc_black": ".hc-black .token rgb(255, 255, 255)" } }, { "c": "------------------", "t": "2.heading.markdown.markup.meta.paragraph.setext", "r": { "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" } }, { </ins> "c": "<!--", "t": "block.comment.definition.html.markdown.meta.paragraph.punctuation", "r": {