add shortcut for substring_before
handle <math> blocks
complain if the parsed data structure contains a code reference
handle links properly