EnlighterJS / Plugin.WordPress

:package: Official WordPress Plugin of EnlighterJS
http://wordpress.org/plugins/enlighter/
GNU General Public License v2.0
115 stars 18 forks source link

cannot highlight the code in article comments #248

Closed haoel closed 4 years ago

haoel commented 4 years ago

I upgrade the Enlighter to the latest version 4.1 on my WordPress, and I found the code in the article comments cannot be parsed and highlighted.

And I cannot find the option to enable this in the latest version.

so, not sure this is a bug.

AndiDittrich commented 4 years ago

HI @haoel ,

which editing method do you use within the comments ? does Enlighter works on regular post/pages ?

haoel commented 4 years ago

@AndiDittrich Yes, the Enlighter works on regular posts. but not posts' replies.

And I used the language tag name for code highlight, such as [c] ... [/c]

The example you can see here : https://coolshell.cn/articles/20845.html (it is a Chinese blog, and you can search user kjyy to see his/her comment)

haoel commented 4 years ago

looks the new Enlighter doesn't suport this kind highlight way [c]..[/c] , or there is a switch I haven't turn on...

AndiDittrich commented 4 years ago

Enlighter -> Editing -> Shortcodes -> Language shortcodes

AndiDittrich commented 4 years ago

but btw. it is absolutely not recommended to use shortcodes anymore (only if you're using plain html editing without Gutenberg/TinyMCE enabled)

AndiDittrich commented 4 years ago

image

haoel commented 4 years ago

thanks so much to point the settings.

1) I enabled it, and some language works but seems rust lang not working... I will check that. 2) I will not use the shortcodes in the future, but it's very hard for me to modify the legacy articles.

I think it's fine to close this issue.

Thank you again!

--Hao