hackmdio / hackmd-io-issues

Reporting issues about HackMD Enterprise Edition and HackMD.io
36 stars 8 forks source link

Code block highlighting not working properly in view mode #226

Closed davidhcefx closed 3 years ago

davidhcefx commented 3 years ago

Is this a hackmd.io issue?

Read our Official tutorial

It's on https://hackmd.io/c/tutorials/

或是中文版 https://hackmd.io/c/tutorials-tw/

What's the problem

Code block highlighting not working properly in view mode:

screenshot

From the above screenshot, note that:

However, what's strange is that ADDING THE SECOND = OR ! DO SOLVE THE PROBLEM! I have no idea how that works.

Current behaviour

Screenshot as above

Provide steps to reproduce:

  1. Try out the above code (https://hackmd.io/QFopG7pgTg6EInWFNSLMgg).

Expected behaviour

Code been highlighted properly instead of no color at all (black on white).

Environment

I use HackMD on:

Desktop

Additional context

Add any other context about the problem here.

jackycute commented 3 years ago

Hi, the proper syntax highlighting works for shell will need to append $ or > before every command line, otherwise it's just output text.

$ echo $EDITOR
vim
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
$ git push
Everything up-to-date
$ echo 'All
> done!'
All
done!
> find $PWD -maxdepth "4" -type 'f' -executable -perm -4000
$ find $PWD -maxdepth "4" -type 'f' -executable -perm -4000
螢幕快照 2021-01-21 下午1 38 03