File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
src/plugins/filter-highlight-all Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 1- // elements with a .no-highlight class will be ignored
2- Prism . plugins . filterHighlightAll . reject . addSelector ( 'code.no-highlight' ) ;
3- Prism . plugins . filterHighlightAll . reject . addSelector ( 'pre.no-highlight > code' ) ;
1+ import prism from '../../global.js' ;
42
5- // don't highlight CSS code
6- Prism . plugins . filterHighlightAll . add ( env => {
7- return env . language !== 'css' ;
8- } ) ;
3+ // Give Prism a chance to load the plugins
4+ setTimeout ( ( ) => {
5+ // elements with a .no-highlight class will be ignored
6+ prism . plugins . filterHighlightAll . reject . addSelector ( 'code.no-highlight' ) ;
7+ prism . plugins . filterHighlightAll . reject . addSelector ( 'pre.no-highlight > code' ) ;
8+
9+ // don't highlight CSS code
10+ prism . plugins . filterHighlightAll . add ( env => {
11+ return env . language !== 'css' ;
12+ } ) ;
13+ } , 100 ) ;
You can’t perform that action at this time.
0 commit comments