fixed codeblock bugs

This commit is contained in:
supertiger1234 2020-03-03 14:27:13 +00:00
parent b1c5800a8d
commit 78d61af61a
4 changed files with 1357 additions and 1145 deletions

2461
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -8,41 +8,41 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.19.0",
"core-js": "^3.4.3",
"axios": "^0.19.2",
"core-js": "^3.6.4",
"linkify-it": "^2.2.0",
"match-sorter": "^4.0.2",
"pako": "^1.0.11",
"simple-markdown": "^0.7.1",
"simple-markdown": "^0.7.2",
"socket.io-client": "^2.3.0",
"twemoji": "^12.1.4",
"twemoji": "^12.1.5",
"v-clipboard": "^2.2.2",
"vue": "^2.6.10",
"vue": "^2.6.11",
"vue-codemirror": "^4.0.6",
"vue-headful": "^2.0.1",
"vue-headful": "^2.1.0",
"vue-mq": "^1.0.1",
"vue-recaptcha": "^1.3.0",
"vue-router": "^3.1.3",
"vue-router": "^3.1.6",
"vue-socket.io-extended": "^4.0.1",
"vue-virtual-scroll-list": "^1.4.4",
"vue-virtual-scroll-list": "^1.4.6",
"vuedraggable": "^2.23.2",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-eslint": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/cli-plugin-babel": "^4.2.3",
"@vue/cli-plugin-eslint": "^4.2.3",
"@vue/cli-plugin-router": "^4.2.3",
"@vue/cli-plugin-vuex": "^4.2.3",
"@vue/cli-service": "^4.2.3",
"@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3",
"babel-eslint": "^10.1.0",
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.13.1",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-template-compiler": "^2.6.10"
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,

View file

@ -37,7 +37,8 @@ pre {
}
.codeblock {
background-color: #ffffff1a;
background-color: rgba(0, 0, 0, 0.46);
border-radius: 4px;
padding: 5px;
word-wrap: break-word;
word-break: break-word;
@ -54,7 +55,7 @@ pre {
}
.inline-code {
background: #273c3e;
background: rgba(0, 0, 0, 0.46);
}
.link {

View file

@ -5,7 +5,7 @@ export default order => {
return {
order: order++,
match: function(source) {
return /^ *```(?:(\S+) *)?\n?((?:[^`])+)```/.exec(source);
return /^ *```(?:(\S+) *)?\n?([^]+?)```/.exec(source);
},
parse: function(capture) {