Rely on Prism being in window to fix dev error (#248)

This commit is contained in:
Matt (IPv4) Cowley 2021-03-31 14:11:16 +01:00 committed by GitHub
parent 8b7cf80733
commit 34ec037d13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 10 deletions

View file

@ -31,8 +31,6 @@ THE SOFTWARE.
</template>
<script>
import Prism from 'prismjs';
export default {
name: 'BashPrism',
props: {
@ -40,7 +38,7 @@ THE SOFTWARE.
},
mounted() {
console.info(`Highlighting ${this.$props.cmd}...`);
Prism.highlightAllUnder(this.$el);
window.Prism.highlightAllUnder(this.$el);
},
methods: {
copied(event) {

View file

@ -32,7 +32,6 @@ THE SOFTWARE.
</template>
<script>
import Prism from 'prismjs';
import 'prismjs/components/prism-docker';
export default {
@ -44,7 +43,7 @@ THE SOFTWARE.
},
mounted() {
console.info(`Highlighting ${this.$props.name}...`);
Prism.highlightAllUnder(this.$el);
window.Prism.highlightAllUnder(this.$el);
},
methods: {
copied(event) {

View file

@ -32,8 +32,6 @@ THE SOFTWARE.
</template>
<script>
import Prism from 'prismjs';
export default {
name: 'NginxPrism',
props: {
@ -43,7 +41,7 @@ THE SOFTWARE.
},
mounted() {
console.info(`Highlighting ${this.$props.name}...`);
Prism.highlightAllUnder(this.$el);
window.Prism.highlightAllUnder(this.$el);
},
methods: {
copied(event) {

View file

@ -32,7 +32,6 @@ THE SOFTWARE.
</template>
<script>
import Prism from 'prismjs';
import 'prismjs/components/prism-yaml';
export default {
@ -44,7 +43,7 @@ THE SOFTWARE.
},
mounted() {
console.info(`Highlighting ${this.$props.name}...`);
Prism.highlightAllUnder(this.$el);
window.Prism.highlightAllUnder(this.$el);
},
methods: {
copied(event) {