File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1+ const PRISM_CDN_URL = 'https://cdn.jsdelivr.net/npm/prismjs@1.30.0' ;
2+
13/**
24 * Create & register the token `Highlight`'s in the `CSS.highlights` registry.
35 * This enables the use of `::highlight(tokenType)` in CSS to style them.
@@ -146,7 +148,7 @@ export async function loadPrismLanguage(language) {
146148 await new Promise ( ( resolve , reject ) => {
147149 if ( langData . has ( lang ) ) return resolve ( ) ;
148150 const script = document . createElement ( 'script' ) ;
149- script . src = `https://unpkg.com/prismjs@1.29.0 /components/prism-${ lang } .min.js` ;
151+ script . src = `${ PRISM_CDN_URL } /components/prism-${ lang } .min.js` ;
150152 script . onload = ( ) => {
151153 document . head . removeChild ( script ) ;
152154 langData . add ( lang ) ;
@@ -170,7 +172,7 @@ export async function loadPrismLanguage(language) {
170172export function loadPrismCore ( ) {
171173 return new Promise ( ( resolve , reject ) => {
172174 const script = document . createElement ( 'script' ) ;
173- script . src = 'https://unpkg.com/prismjs@1.29.0/ components/prism-core.min.js' ;
175+ script . src = ` ${ PRISM_CDN_URL } / components/prism-core.min.js` ;
174176 script . onload = resolve ;
175177 script . onerror = reject ;
176178 document . head . appendChild ( script ) ;
You can’t perform that action at this time.
0 commit comments