Fix buggy regex

This is hacky part anyway - but when you have a `.md` file that contains Razor header `@{ Layout="..." etc. }` then we only want the header (and not all content until some `}` that appears later). This should be replaced with a proper parser though.