highlight code

add code highlight function and fix the code segment view error function