From 65d4787ce22f977f4a1f8f2ab1e2d4c3acd7f792 Mon Sep 17 00:00:00 2001 From: Forrest Oliphant Date: Sat, 13 Feb 2016 00:26:05 -0500 Subject: [PATCH] allow figcaption child #35 --- index.coffee | 2 +- spec/Flatten.coffee | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/index.coffee b/index.coffee index 826c720..40cf36a 100644 --- a/index.coffee +++ b/index.coffee @@ -418,7 +418,7 @@ module.exports = class Flatten return '' if tag.data.trim() is '' return '' if tag.data is ' ' return tag.data - allowSubBlock = tag.name in ['video', 'article', 'figure', 'blockquote'] + allowSubBlock = tag.name in ['video', 'article', 'figure', 'figcaption', 'blockquote'] if tag.name in @blockLevel and not tag.children return '' diff --git a/spec/Flatten.coffee b/spec/Flatten.coffee index 9ae00f4..7b14c82 100644 --- a/spec/Flatten.coffee +++ b/spec/Flatten.coffee @@ -70,6 +70,7 @@ describe 'Flatten', ->
\"AnAn illustration of NoFlo used to create a flow-based version of the Jekyll tool for converting text into content suitable for Web publishing.
\n
Tom Turley / Getty Images
+

Title

Desc

""" ] @@ -93,6 +94,11 @@ describe 'Flatten', -> src: 'http://timenewsfeed.files.wordpress.com/2012/02/slanglol.jpg?w=480&h=320&crop=1' caption: 'Tom Turley / Getty Images' html: "
Tom Turley / Getty Images
" + , + type: 'image' + src: 'http://a.com/b.jpg' + caption: '

Title

Desc

' + html: "

Title

Desc

" ] ]