Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## This is a file in a folder
## Edge Cases that break the build

Bug fix from bbc/web repo. Code block in a NOTE blockquote.

Expand All @@ -19,4 +19,30 @@ Bug fix from bbc/web repo. Code block in a NOTE blockquote.
> );
> }
> `;
> ```
> ```


> **bold text
> Blockquotes with Unclosed Markdown Syntax. **This text is actually bold**


> Emoji shortcuts
> :warning: Be careful!


> Tables in blockquotes
> ---
> | Header | Value |
> |--------|-------|
> | a | b |


>
>
> Some text with blank spaces above


> Nested lists in blockquotes
> 1. Item one
> - Subitem
> 2. Item two
6 changes: 2 additions & 4 deletions src/markdown-to-html-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ const parseToHTML = (markdown, options = {}) => {
textString += this.parser.parseInline(token.tokens)
} else if (token.type === 'space') {
textString += this.parser.parseInline([{ type: 'br', text: token.text, raw: token.raw }])
} else if (token.type === 'list') {
textString += marked.Renderer.prototype.list.call(this, token)
} else if (token.type === 'code') {
textString += marked.Renderer.prototype.code.call(this, token)
} else if (['list', 'code', 'hr', 'table'].includes(token.type)) {
textString += marked.Renderer.prototype[token.type].call(this, token) // use default renderer for these block-level tokens
} else {
textString += this.parser.parseInline(tokens)
}
Expand Down