Skip to content

Commit

Permalink
fix: error while uploading image (#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangsongc authored Dec 15, 2021
1 parent d325c45 commit 61f8663
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/mixins/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ function initMarkdown() {
export default {
data() {
return {
MarkdownIt: null
markdownIt: null
}
},
created() {
this.MarkdownIt = initMarkdown();
this.markdownIt = initMarkdown();
if (!this.html) {
this.MarkdownIt.set({ html: false });
this.markdownIt.set({ html: false });
this.xssOptions = false;
} else if (typeof this.xssOptions === 'object') {
this.MarkdownIt.use(sanitizer, this.xssOptions);
this.markdownIt.use(sanitizer, this.xssOptions);
}
},
mounted() {
Expand All @@ -123,7 +123,7 @@ export default {
var $vm = this;
missLangs = {};
needLangs = [];
var res = this.MarkdownIt.render(src);
var res = this.markdownIt.render(src);
if (this.ishljs) {
if (needLangs.length > 0) {
$vm.$_render(src, func, res);
Expand All @@ -139,7 +139,7 @@ export default {
loadScript(url, function () {
deal = deal + 1;
if (deal === needLangs.length) {
res = this.MarkdownIt.render(src);
res = this.markdownIt.render(src);
func(res);
}
})
Expand Down

0 comments on commit 61f8663

Please sign in to comment.