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

" ] ]