Skip to content

Commit dfd6d07

Browse files
committed
refactor: port over prism-languages JS plugin; export module so other components can pull in
1 parent f0b77ac commit dfd6d07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/uikit-workshop/src/js/prism-languages.js renamed to packages/uikit-workshop/src/scripts/components/prism-languages.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
* Licensed under the MIT license
66
*
77
*/
8-
var PrismLanguages = {
8+
export const PrismLanguages = {
99
languages: [],
1010

1111
get: function(key) {
1212
var language;
1313

14-
for (i = 0; i < this.languages.length; ++i) {
14+
for (var i = 0; i < this.languages.length; ++i) {
1515
language = this.languages[i];
1616
if (language[key] !== undefined) {
1717
return language[key];
@@ -25,7 +25,7 @@ var PrismLanguages = {
2525
// see if the language already exists, overwrite if it does
2626
for (var key in language) {
2727
if (language.hasOwnProperty(key)) {
28-
for (i = 0; i < this.languages.length; ++i) {
28+
for (var i = 0; i < this.languages.length; ++i) {
2929
if (this.languages[i][key] !== undefined) {
3030
this.languages[i][key] = language[key];
3131
return;

0 commit comments

Comments
 (0)