fix code hightlight bug

fix a bug which may result in no closing tags when insert short code.

for example, we use ` insert short some code in markdown and then the tag </code> will be removed in old version.