diff --git a/src/markd/core.js b/src/markd/core.js index e7aead5..dd5aa28 100644 --- a/src/markd/core.js +++ b/src/markd/core.js @@ -521,13 +521,23 @@ class Tool { continue } - if (isParagraph) { + if (isHtmlBlock || isSingleLineHtml) { + if (isParagraph) { + isParagraph = false + html = trimBr(html) + html += '
' + } + html += `${it}\n` + } else if (isMultiLineHtml) { + if (isParagraph) { + isParagraph = false + html = trimBr(html) + html += '' + } + isHtmlBlock = !isHtmlBlock html += `${it}\n` } else { - if (isHtmlBlock || isSingleLineHtml) { - html += `${it}\n` - } else if (isMultiLineHtml) { - isHtmlBlock = !isHtmlBlock + if (isParagraph) { html += `${it}\n` } else { html += `\n${it}` diff --git a/src/markd/index.js b/src/markd/index.js index e16c7e3..1d366a6 100644 --- a/src/markd/index.js +++ b/src/markd/index.js @@ -68,6 +68,10 @@ class Markd extends Component { p { margin: 0; } + > blockquote { + margin: 5px 0; + padding: 0 10px; + } } fieldset.md-hr { @@ -193,7 +197,6 @@ class Markd extends Component { ` render() { - // console.log(md2html(this.code)) return html`