Edit to check markup depending on content type