Skip to content

Commit 2a33075

Browse files
committed
fix($markdown): cannot highlight external python file (.py) correctly (close: #660)
1 parent 39f5c68 commit 2a33075

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/markdown/highlight.js

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ module.exports = (str, lang) => {
2929
if (lang === 'ts') {
3030
lang = 'typescript'
3131
}
32+
if (lang === 'py') {
33+
lang = 'python'
34+
}
3235
if (!prism.languages[lang]) {
3336
try {
3437
loadLanguages([lang])

0 commit comments

Comments
 (0)