fix markdown chunk generator