Commit parser state after adding characters to doctype name.

Thanks, @dgreensp. Closes #75