Skip to content

Commit

Permalink
MFM のバッククオートで囲ったコードが表示されないのを修正 (#6741)
Browse files Browse the repository at this point in the history
  • Loading branch information
takonomura committed Oct 18, 2020
1 parent 30e2545 commit 059aeef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -246,7 +246,6 @@
"vue-i18n": "9.0.0-beta.4",
"vue-json-pretty": "1.7.0",
"vue-loader": "16.0.0-beta.7",
"vue-prism-component": "1.2.0",
"vue-prism-editor": "1.2.2",
"vue-router": "4.0.0-beta.13",
"vue-style-loader": "4.1.2",
Expand Down
10 changes: 5 additions & 5 deletions src/client/components/code-core.vue
@@ -1,17 +1,14 @@
<template>
<XPrism :inline="inline" :language="prismLang">{{ code }}</XPrism>
<code v-if="inline" v-html="html" :class="`language-${prismLang}`"></code>
<pre v-else :class="`language-${prismLang}`"><code v-html="html" :class="`language-${prismLang}`"></code></pre>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import 'prismjs';
import 'prismjs/themes/prism-okaidia.css';
import XPrism from 'vue-prism-component';import * as os from '@/os';
export default defineComponent({
components: {
XPrism
},
props: {
code: {
type: String,
Expand All @@ -29,6 +26,9 @@ export default defineComponent({
computed: {
prismLang() {
return Prism.languages[this.lang] ? this.lang : 'js';
},
html() {
return Prism.highlight(this.code, Prism.languages[this.prismLang], this.prismLang);
}
}
});
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Expand Up @@ -10401,11 +10401,6 @@ vue-loader@16.0.0-beta.7:
merge-source-map "^1.1.0"
source-map "^0.6.1"

vue-prism-component@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/vue-prism-component/-/vue-prism-component-1.2.0.tgz#406252e16979def13b5d28827d95b2b6dc647825"
integrity sha512-0N9CNuQu+36CJpdsZHrhdq7d18oBvjVMjawyKdIr8xuzFWLfdxECZQYbFaYoopPBg3SvkEEMtkhYqdgTQl5Y+A==

vue-prism-editor@1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/vue-prism-editor/-/vue-prism-editor-1.2.2.tgz#023cfd4329848f191aac851f2f5e6c7a8c2e059f"
Expand Down

0 comments on commit 059aeef

Please sign in to comment.