When reference style and inline style are mixed together, in the same line, it produces weird parsing bugs. This commit fixes this Closes #261
sd-ref
foo
sd-inline