Ensure doc_line resets algebra formatting line buffer, closes #2014