diff --git a/src/code/index.js b/src/code/index.js index ad9b126..c091b69 100644 --- a/src/code/index.js +++ b/src/code/index.js @@ -23,6 +23,7 @@ class Code extends Component { position: relative; width: 100%; margin: 10px 0; + padding-bottom: 6px; border-radius: 3px; background: #f7f8fb; color: var(--color-dark-1); diff --git a/src/markd/core.js b/src/markd/core.js index 4f598c6..d2cf047 100644 --- a/src/markd/core.js +++ b/src/markd/core.js @@ -205,8 +205,6 @@ class Tool { var isTable = false // 是否表格 var emptyLineLength = 0 //连续空行的数量 - // console.log(lines) - for (let it of lines) { let tmp = it.trim() @@ -275,7 +273,7 @@ class Tool { list.push('') continue } - if (list.length === 0 || (!isCodeBlock && emptyLineLength > 0)) { + if (list.length === 0 || (!isCodeBlock && emptyLineLength > 1)) { continue } emptyLineLength++ @@ -531,8 +529,8 @@ class Tool { // 引用结束 if (isBlockquote) { - isBlockquote = false if (emptyLineLength > 1) { + isBlockquote = false emptyLineLength = 0 while (blockquoteLevel > 0) { blockquoteLevel-- diff --git a/src/markd/index.js b/src/markd/index.js index 8a300f4..da6a806 100644 --- a/src/markd/index.js +++ b/src/markd/index.js @@ -12,7 +12,7 @@ import '../form/checkbox.js' class Markd extends Component { static props = { - code: '' + code: { type: String, default: '', attribute: false } } static styles = css` diff --git a/src/sandbox/index.js b/src/sandbox/index.js index 5ff3f3b..06704a8 100644 --- a/src/sandbox/index.js +++ b/src/sandbox/index.js @@ -174,10 +174,10 @@ class Sandbox extends Component { - + - + diff --git a/src/scroll/index.js b/src/scroll/index.js index 99bec02..14ae374 100644 --- a/src/scroll/index.js +++ b/src/scroll/index.js @@ -18,8 +18,6 @@ class Scroll extends Component { :host { position: relative; display: block; - width: 100%; - height: 100%; .container { overflow: hidden;