Fix bug where file cannot start with an inline eq

If a markdown document started with $...$ then it would not be parsed as
an inline equation, causing many other problems. This issue essentially
tracks back to no lookbehind support in javascripts regex
implementation.