Speed up by tokenising chunks of non-markdown text as one token
Fix newline matching
Updated generated code
Cache the topFontAttributes
Cache the current attributes as long as possible