1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Merge pull request #5029 from uhoreg/sanitize_language

don't syntax highlight languages that begin with "_"
This commit is contained in:
Hubert Chathi
2020-07-21 13:12:51 -04:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -107,7 +107,7 @@ export default createReactClass({
} else {
// Only syntax highlight if there's a class starting with language-
const classes = blocks[i].className.split(/\s+/).filter(function(cl) {
return cl.startsWith('language-');
return cl.startsWith('language-') && !cl.startsWith('language-_');
});
if (classes.length != 0) {