highlightjs/highlight.js

`noHighlightRe` should win out over `languageDetectRe`

オープン

#3,700 opened on 2023/01/25

 (12 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (3,497 件のフォーク)batch import
enhancementgood first issuehelp welcomeparserversion-12

Repository metrics

Stars
 (22,960 個のスター)
PR merge metrics
 (平均マージ 6m) (30d で 2 merged PRs)

説明

If a class name matches noHighlightRe it should always be ignored - even if it otherwise looks correct and is also a match of languageDetectRe... this would allow you to use lang-* as your detect match but then also have an exclude list in the noHightlightRe regex.

IE, the block list overrides the allow list. This is an edge case. If no one steps up to work on this before v12 this will auto-close as it's such a small edge case (and also a breaking change).


Is your request related to a specific problem you're having? I am using highlight.js to with "hljs.highlightAll()", and get these warnings. image

The solution you'd prefer / feature you'd like to see added... an option like: excluded-languages: {mermaid, ...} or an option to disable these warnings.

コントリビューターガイド