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-inline sd-ref
foo
sd-ref sd-inline