Fix markdown header parsing