Fix crashes in parser at end-of-string conditions.
Fix crashes in parser at end-of-string conditions.

Links and quotes and end of string caused it to crash.

Quintus/chessboard,Quintus/chessboard,Quintus/chessboard,Quintus/chessboard