Skip to content

Commit 0bfaf06

Browse files
committed
fix(umd): fixed an issue with undefined marked and prismjs
1 parent 5a6af78 commit 0bfaf06

9 files changed

Lines changed: 27 additions & 65 deletions

File tree

.eslintrc

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -25,43 +25,5 @@
2525
"no-process-exit": 0,
2626
"camelcase": 0,
2727
"no-console": 0
28-
},
29-
"globals": {
30-
"hljs": true,
31-
"Prism":true,
32-
"twttr": true,
33-
"fetchJsonp": true,
34-
"videojs": true,
35-
"marked": true,
36-
"EMOJI": true,
37-
"LINK": true,
38-
"TWITTER": true,
39-
"SMILEY": true,
40-
"HIGHLIGHTCODE": true,
41-
"MARKDOWN": true,
42-
"MAP": true,
43-
"YOUTUBE": true,
44-
"VIMEO": true,
45-
"TED": true,
46-
"DAILYMOTION": true,
47-
"USTREAM": true,
48-
"LIVELEAK": true,
49-
"VINE": true,
50-
"BASICVIDEO": true,
51-
"SPOTIFY": true,
52-
"SOUNDCLOUD": true,
53-
"BASICAUDIO": true,
54-
"CODEPEN": true,
55-
"IDEONE": true,
56-
"JSBIN": true,
57-
"JSFIDDLE": true,
58-
"PLUNKER": true,
59-
"GIST": true,
60-
"FLICKR": true,
61-
"BASICIMAGE": true,
62-
"INSTAGRAM": true,
63-
"OPENGRAPH": true,
64-
"GITHUB": true,
65-
"SLIDESHARE": true
6628
}
6729
}

dist/embed.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/embed.es2015.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/embed.es2015.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/embed.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/embed.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ var defaultOptions = {
7979
height : 460
8080
},
8181
plugins : {
82-
marked : marked,
83-
videojs : videojs,
84-
highlightjs: hljs,
85-
prismjs : Prism,
86-
twitter : twttr
82+
marked : window.marked,
83+
videojs : window.videojs,
84+
highlightjs: window.hljs,
85+
prismjs : window.Prism,
86+
twitter : window.twttr
8787
},
8888
googleAuthKey : '',
8989
soundCloudOptions : {

src/js/modules/code/highlight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default class Highlight {
9090

9191
if (this.isPrism()){
9292
const PrismJS = this.options.plugins.prismjs;
93-
highlightedCode = PrismJS.highlight(code, Prism.languages[language.toLowerCase() || 'markup'])
93+
highlightedCode = PrismJS.highlight(code, PrismJS.languages[language.toLowerCase() || 'markup'])
9494
}
9595
else{
9696
const HighlightJS = this.options.plugins.highlightjs;

src/js/modules/markdown.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export default class Markdown {
2929

3030
//Fix for heading that should be actually present in marked.js
3131
//if gfm is true the `## Heading` is acceptable but `##Heading` is not
32-
Marked.Lexer.rules.gfm.heading = marked.Lexer.rules.normal.heading;
33-
Marked.Lexer.rules.tables.heading = marked.Lexer.rules.normal.heading;
32+
Marked.Lexer.rules.gfm.heading = Marked.Lexer.rules.normal.heading;
33+
Marked.Lexer.rules.tables.heading = Marked.Lexer.rules.normal.heading;
3434

3535
this.options.markedOptions.renderer = renderer;
3636
this.options.markedOptions.highlight = false;

0 commit comments

Comments
 (0)