Generate id attributes for markdown header elements