mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
chore: upgrade dependencies version (#109)
This commit is contained in:
parent
bc4a629222
commit
56d8fb66e7
55
package.json
55
package.json
@ -11,53 +11,46 @@
|
||||
"mm": "npx mockm --cwd=mm"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/shared": "^3.0.11",
|
||||
"@vue/shared": "^3.2.23",
|
||||
"ali-oss": "^6.16.0",
|
||||
"axios": "^0.21.2",
|
||||
"buffer-from": "^1.1.1",
|
||||
"codemirror": "^5.61.0",
|
||||
"core-js": "^3.11.0",
|
||||
"axios": "^0.24.0",
|
||||
"buffer-from": "^1.1.2",
|
||||
"codemirror": "^5.64.0",
|
||||
"core-js": "^3.19.2",
|
||||
"cos-js-sdk-v5": "^1.3.1",
|
||||
"crypto-js": "^4.0.0",
|
||||
"element-ui": "^2.15.1",
|
||||
"form-data": "2.3.3",
|
||||
"crypto-js": "^4.1.1",
|
||||
"element-ui": "^2.15.6",
|
||||
"form-data": "4.0.0",
|
||||
"jquery": "^3.6.0",
|
||||
"juice": "^7.0.0",
|
||||
"marked": "^2.0.3",
|
||||
"node-fetch": "2.6.2",
|
||||
"prettier": "^2.2.1",
|
||||
"juice": "^8.0.0",
|
||||
"marked": "^4.0.5",
|
||||
"node-fetch": "3.1.0",
|
||||
"prettier": "^2.5.0",
|
||||
"prettify": "^0.1.7",
|
||||
"qiniu-js": "^3.4.0",
|
||||
"regenerator-runtime": "^0.13.7",
|
||||
"regenerator-runtime": "^0.13.9",
|
||||
"uuid": "^8.3.2",
|
||||
"vue": "^2.6.12",
|
||||
"vue-router": "^3.4.9",
|
||||
"vuex": "^3.5.1"
|
||||
"vue": "^2.6.14",
|
||||
"vue-router": "^3.5.3",
|
||||
"vuex": "^3.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.12",
|
||||
"@vue/cli-service": "~4.5.12",
|
||||
"async-validator": "^3.5.1",
|
||||
"@vue/cli-plugin-babel": "~4.5.15",
|
||||
"@vue/cli-service": "~4.5.15",
|
||||
"async-validator": "^4.0.7",
|
||||
"babel-plugin-import": "^1.13.3",
|
||||
"cross-env": "^7.0.3",
|
||||
"jest": "^25.4.0",
|
||||
"less": "^3.12.2",
|
||||
"less-loader": "^5.0.0",
|
||||
"jest": "^27.4.0",
|
||||
"less": "^4.1.2",
|
||||
"less-loader": "^7.3.0",
|
||||
"mini-types": "*",
|
||||
"miniprogram-api-typings": "*",
|
||||
"mockm": "^1.1.25",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss-comment": "^2.0.0",
|
||||
"raw-loader": "^4.0.2",
|
||||
"sass-loader": "^11.0.1",
|
||||
"sass-loader": "^12.3.0",
|
||||
"shx": "^0.3.3",
|
||||
"vue-template-compiler": "^2.6.12"
|
||||
},
|
||||
"browserslist": [
|
||||
"Android >= 4",
|
||||
"ios >= 8"
|
||||
],
|
||||
"uni-app": {
|
||||
"scripts": {}
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import marked from "marked";
|
||||
import { Renderer } from "marked";
|
||||
|
||||
class WxRenderer {
|
||||
constructor(opts) {
|
||||
this.opts = opts;
|
||||
@ -96,7 +97,7 @@ class WxRenderer {
|
||||
footnoteIndex = 0;
|
||||
|
||||
styleMapping = this.buildTheme(this.opts.theme);
|
||||
let renderer = new marked.Renderer();
|
||||
let renderer = new Renderer();
|
||||
|
||||
renderer.heading = (text, level) => {
|
||||
switch (level) {
|
||||
|
@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import Vuex from "vuex";
|
||||
import config from "../assets/scripts/config";
|
||||
import WxRenderer from "../assets/scripts/renderers/wx-renderer";
|
||||
import marked from "marked";
|
||||
import { marked } from "marked";
|
||||
import CodeMirror from "codemirror/lib/codemirror";
|
||||
import DEFAULT_CONTENT from "@/assets/example/markdown.md";
|
||||
import DEFAULT_CSS_CONTENT from "@/assets/example/theme-css.txt";
|
||||
@ -111,7 +111,7 @@ const mutations = {
|
||||
"Ctrl-I": function italic(editor) {
|
||||
const selected = editor.getSelection();
|
||||
editor.replaceSelection(`*${selected}*`);
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
@ -140,9 +140,9 @@ const mutations = {
|
||||
});
|
||||
},
|
||||
editorRefresh(state) {
|
||||
let output = marked(state.editor.getValue(0), {
|
||||
renderer: state.wxRenderer.getRenderer(state.citeStatus),
|
||||
});
|
||||
let renderer = state.wxRenderer.getRenderer(state.citeStatus);
|
||||
marked.setOptions({ renderer });
|
||||
let output = marked.parse(state.editor.getValue(0));
|
||||
|
||||
// 去除第一行的 margin-top
|
||||
output = output.replace(/(style=".*?)"/, '$1;margin-top: 0"');
|
||||
|
Loading…
Reference in New Issue
Block a user