Fix text buffer being empty after parsing the markdown