EnlighterJS / Plugin.WordPress

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

Turn off latex syntax highlighting #263

Closed rrrfer closed 4 years ago

rrrfer commented 4 years ago

Turn off latex syntax highlighting. I am using a plugin that uses the [latex] tag to highlight formulas. After the update, all formulas became text. It's horrible... Снимок экрана от 2020-05-11 14-03-01

rrrfer commented 4 years ago

Пока что решил проблему так: в файле enlighter/modules/core/LanguageManager.php закомментировал строку с latex. Фрагмент файла:

      'json' => 'JSON',
        'kotlin' => 'Kotlin',
        //'latex' => 'LaTeX',
        'less' => 'LESS',
        'lighttpd' => 'lighttpd',
        'lua' => 'LUA',
        'md' => 'Markdown',

Теперь все работает. Но вообще это не здорово, потому что для форматирования формул часто исопльзуется $$ a^b $$ и [latex] a^b [/latex] В первом случае формула располагается на отдельной строке, а во втором - инлайнится в текст. По крайней мере так ведет себя самый популярный в WP плагин для latex. А ваш плагин с ним конфликтует...

AndiDittrich commented 4 years ago

Hi @rrrfer

please use english or german for support request...otherwise i cannot help you.


generally the shortcode editing method in WordPress (as well as in Enlighter) has been deprecated. It's recommended to use the VisualEditing modes instead to avoid a lot of issues.

To solve your issues there a two possibilities:

1 . Disable the language shortcodes: just goto Enlighter -> Editing -> Shortcodes -> Language shortcodes.

  1. The other "reliable" way to disable specific language shortcodes is to alter the language list via filters
rrrfer commented 4 years ago

Disable the language shortcodes: just goto Enlighter -> Editing -> Shortcodes -> Language shortcodes.

I do not see Language shortcodes. There is no such item in the interface (attached pictures)

Снимок экрана от 2020-05-11 15-59-09 Снимок экрана от 2020-05-11 15-59-17

AndiDittrich commented 4 years ago

take a closer look... first picture, 3rd checkbox/slider