Skip to content

Commit 912d739

Browse files
authored
Fix code highlight: remove 'markdown' from automatic language detection. (#8882)
1 parent d6555db commit 912d739

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

third_party/highlight/init.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1+
hljs.configure({
2+
// The list of languages that may be used in the auto-detection.
3+
// NOTE: always derive this list from the `readme.md`.
4+
languages: [
5+
'bash',
6+
'c',
7+
'css',
8+
'dart',
9+
'diff',
10+
'java',
11+
'javascript',
12+
'json',
13+
'kotlin',
14+
// removal reason: https://github.com/highlightjs/highlight.js/issues/4279#issuecomment-3126165923
15+
// 'markdown',
16+
'objectivec',
17+
'plaintext',
18+
'shell',
19+
'swift',
20+
'xml',
21+
'yaml',
22+
]
23+
});
124
hljs.highlightAll();

third_party/highlight/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
4. Verify that the listed language are selected.
1111
5. Download and extract assets.
1212

13+
**NOTE:** when updating this list, also update the `init.js`.
14+
1315
```javascript
1416
var selected = [
1517
'bash',

0 commit comments

Comments
 (0)