Skip to content

Commit 6f5f074

Browse files
author
Jan Bílek
committed
Some fixes
1 parent 4b19962 commit 6f5f074

13 files changed

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

demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><link rel=stylesheet href=/themes/duotone-sea.css type=text/css><title>vue-code-highlight</title><link as=style href=/css/app.7f9df541.css rel=preload><link as=script href=/js/app.e09c8cca.js rel=preload><link as=script href=/js/chunk-vendors.523e359a.js rel=preload><link href=/css/app.7f9df541.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-code-highlight doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.523e359a.js></script><script src=/js/app.e09c8cca.js></script></body></html>
1+
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><link rel=stylesheet href=/themes/duotone-sea.css type=text/css><title>vue-code-highlight</title><link as=style href=/css/app.bfc4f022.css rel=preload><link as=script href=/js/app.90760f0a.js rel=preload><link as=script href=/js/chunk-vendors.523e359a.js rel=preload><link href=/css/app.bfc4f022.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-code-highlight doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.523e359a.js></script><script src=/js/app.90760f0a.js></script></body></html>

demo/js/app.90760f0a.js

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

demo/js/app.90760f0a.js.map

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

demo/js/app.e09c8cca.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

demo/js/app.e09c8cca.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/vue-code-highlight.esm.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,9 @@ if (Prism.languages.markup) {
765765

766766
Prism.languages.js = Prism.languages.javascript;
767767

768-
(function(){ if(typeof document !== 'undefined'){ var head=document.head||document.getElementsByTagName('head')[0], style=document.createElement('style'), css=" pre[class*=\"language-\"][data-v-9d5e6bde] { display: inline-block; padding-right: 10em; padding-top: 3rem; border-radius: 6px; background-image: url(\"./assets/window-controls.svg\"); background-repeat: no-repeat; background-position: 16px 16px; box-shadow: 5px 5px 15px 0px rgba(50, 50, 50, 0.75); } "; style.type='text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); } })();
768+
(function(){ if(typeof document !== 'undefined'){ var head=document.head||document.getElementsByTagName('head')[0], style=document.createElement('style'), css=" pre[class*=\"language-\"][data-v-23ac0a9e] { display: inline-block; padding-right: 10em; padding-top: 3rem; border-radius: 6px; background-image: url(\"./assets/window-controls.svg\"); background-repeat: no-repeat; background-position: 16px 16px; box-shadow: 5px 5px 15px 0px rgba(50, 50, 50, 0.75); } "; style.type='text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); } })();
769769

770-
var vueHighlight = {render: function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',{ref:"code",class:_vm.languageClass},[_vm._v(" "),_c('code',[_vm._v("\n "),_vm._t("default"),_vm._v("\n ")],2),_vm._v("\n")])},staticRenderFns: [],_scopeId: 'data-v-9d5e6bde',
770+
var CodeHighlight = {render: function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"codeBlock"},[_c('pre',{class:_vm.languageClass},[_vm._v(" "),_c('code',[_vm._v("\n "),_vm._t("default"),_vm._v("\n ")],2),_vm._v("\n ")])])},staticRenderFns: [],_scopeId: 'data-v-23ac0a9e',
771771
name: 'code-highlight',
772772
props: {
773773
language: {
@@ -781,23 +781,20 @@ var vueHighlight = {render: function(){var _vm=this;var _h=_vm.$createElement;va
781781
},
782782
},
783783
mounted: function mounted() {
784-
Prism.highlightElement(this.$refs.code);
784+
Prism.highlightAllUnder(this.$refs.codeBlock);
785785
},
786786
};
787787

788-
var registerDirective = {
789-
componentUpdated: function componentUpdated(el) {
790-
Prism.highlightAllUnder(el);
791-
},
792-
};
788+
function registerDirective (el) {
789+
Prism.highlightAllUnder(el);
790+
}
793791

794792
// Import vue component
795793

796794
// Declare install function executed by Vue.use()
797795
function install(Vue) {
798796
if (install.installed) { return; }
799797
install.installed = true;
800-
Vue.component('VueCodeHighlight', vueHighlight);
801798
Vue.directive('highlight', registerDirective);
802799
}
803800

@@ -818,4 +815,4 @@ if (GlobalVue) {
818815
}
819816

820817
export default install;
821-
export { vueHighlight };
818+
export { CodeHighlight as component };

dist/vue-code-highlight.min.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -768,9 +768,9 @@ var vueCodeHighlight = (function (exports) {
768768

769769
Prism.languages.js = Prism.languages.javascript;
770770

771-
(function(){ if(typeof document !== 'undefined'){ var head=document.head||document.getElementsByTagName('head')[0], style=document.createElement('style'), css=" pre[class*=\"language-\"][data-v-9d5e6bde] { display: inline-block; padding-right: 10em; padding-top: 3rem; border-radius: 6px; background-image: url(\"./assets/window-controls.svg\"); background-repeat: no-repeat; background-position: 16px 16px; box-shadow: 5px 5px 15px 0px rgba(50, 50, 50, 0.75); } "; style.type='text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); } })();
771+
(function(){ if(typeof document !== 'undefined'){ var head=document.head||document.getElementsByTagName('head')[0], style=document.createElement('style'), css=" pre[class*=\"language-\"][data-v-23ac0a9e] { display: inline-block; padding-right: 10em; padding-top: 3rem; border-radius: 6px; background-image: url(\"./assets/window-controls.svg\"); background-repeat: no-repeat; background-position: 16px 16px; box-shadow: 5px 5px 15px 0px rgba(50, 50, 50, 0.75); } "; style.type='text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); } })();
772772

773-
var vueHighlight = {render: function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',{ref:"code",class:_vm.languageClass},[_vm._v(" "),_c('code',[_vm._v("\n "),_vm._t("default"),_vm._v("\n ")],2),_vm._v("\n")])},staticRenderFns: [],_scopeId: 'data-v-9d5e6bde',
773+
var CodeHighlight = {render: function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"codeBlock"},[_c('pre',{class:_vm.languageClass},[_vm._v(" "),_c('code',[_vm._v("\n "),_vm._t("default"),_vm._v("\n ")],2),_vm._v("\n ")])])},staticRenderFns: [],_scopeId: 'data-v-23ac0a9e',
774774
name: 'code-highlight',
775775
props: {
776776
language: {
@@ -784,23 +784,20 @@ var vueCodeHighlight = (function (exports) {
784784
},
785785
},
786786
mounted: function mounted() {
787-
Prism.highlightElement(this.$refs.code);
787+
Prism.highlightAllUnder(this.$refs.codeBlock);
788788
},
789789
};
790790

791-
var registerDirective = {
792-
componentUpdated: function componentUpdated(el) {
793-
Prism.highlightAllUnder(el);
794-
},
795-
};
791+
function registerDirective (el) {
792+
Prism.highlightAllUnder(el);
793+
}
796794

797795
// Import vue component
798796

799797
// Declare install function executed by Vue.use()
800798
function install(Vue) {
801799
if (install.installed) { return; }
802800
install.installed = true;
803-
Vue.component('VueCodeHighlight', vueHighlight);
804801
Vue.directive('highlight', registerDirective);
805802
}
806803

@@ -821,7 +818,7 @@ var vueCodeHighlight = (function (exports) {
821818
}
822819

823820
exports.default = install;
824-
exports.vueHighlight = vueHighlight;
821+
exports.component = CodeHighlight;
825822

826823
return exports;
827824

dist/vue-code-highlight.umd.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,9 @@
771771

772772
Prism.languages.js = Prism.languages.javascript;
773773

774-
(function(){ if(typeof document !== 'undefined'){ var head=document.head||document.getElementsByTagName('head')[0], style=document.createElement('style'), css=" pre[class*=\"language-\"][data-v-9d5e6bde] { display: inline-block; padding-right: 10em; padding-top: 3rem; border-radius: 6px; background-image: url(\"./assets/window-controls.svg\"); background-repeat: no-repeat; background-position: 16px 16px; box-shadow: 5px 5px 15px 0px rgba(50, 50, 50, 0.75); } "; style.type='text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); } })();
774+
(function(){ if(typeof document !== 'undefined'){ var head=document.head||document.getElementsByTagName('head')[0], style=document.createElement('style'), css=" pre[class*=\"language-\"][data-v-23ac0a9e] { display: inline-block; padding-right: 10em; padding-top: 3rem; border-radius: 6px; background-image: url(\"./assets/window-controls.svg\"); background-repeat: no-repeat; background-position: 16px 16px; box-shadow: 5px 5px 15px 0px rgba(50, 50, 50, 0.75); } "; style.type='text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); } })();
775775

776-
var vueHighlight = {render: function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('pre',{ref:"code",class:_vm.languageClass},[_vm._v(" "),_c('code',[_vm._v("\n "),_vm._t("default"),_vm._v("\n ")],2),_vm._v("\n")])},staticRenderFns: [],_scopeId: 'data-v-9d5e6bde',
776+
var CodeHighlight = {render: function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"codeBlock"},[_c('pre',{class:_vm.languageClass},[_vm._v(" "),_c('code',[_vm._v("\n "),_vm._t("default"),_vm._v("\n ")],2),_vm._v("\n ")])])},staticRenderFns: [],_scopeId: 'data-v-23ac0a9e',
777777
name: 'code-highlight',
778778
props: {
779779
language: {
@@ -787,23 +787,20 @@
787787
},
788788
},
789789
mounted: function mounted() {
790-
Prism.highlightElement(this.$refs.code);
790+
Prism.highlightAllUnder(this.$refs.codeBlock);
791791
},
792792
};
793793

794-
var registerDirective = {
795-
componentUpdated: function componentUpdated(el) {
796-
Prism.highlightAllUnder(el);
797-
},
798-
};
794+
function registerDirective (el) {
795+
Prism.highlightAllUnder(el);
796+
}
799797

800798
// Import vue component
801799

802800
// Declare install function executed by Vue.use()
803801
function install(Vue) {
804802
if (install.installed) { return; }
805803
install.installed = true;
806-
Vue.component('VueCodeHighlight', vueHighlight);
807804
Vue.directive('highlight', registerDirective);
808805
}
809806

@@ -824,7 +821,7 @@
824821
}
825822

826823
exports.default = install;
827-
exports.vueHighlight = vueHighlight;
824+
exports.component = CodeHighlight;
828825

829826
Object.defineProperty(exports, '__esModule', { value: true });
830827

0 commit comments

Comments
 (0)