datocms-structured-text-generic-html-renderer
Advanced tools
Comparing version 0.1.0-alpha.9 to 0.1.0-alpha.10
@@ -68,5 +68,8 @@ "use strict"; | ||
var textWithNewlinesConvertedToBr = lines.length > 0 | ||
? lines.slice(1).reduce(function (acc, line) { | ||
return acc.concat([renderNode('br'), line]); | ||
}, [lines[0]]) | ||
? lines.slice(1).reduce(function (acc, line, index) { | ||
return acc.concat([ | ||
renderNode('br', { key: "br-" + index }), | ||
renderText(line, "line-" + index), | ||
]); | ||
}, [renderText(lines[0], 'line-first')]) | ||
: renderText(node.value, key); | ||
@@ -73,0 +76,0 @@ return marks.reduce(function (children, mark) { |
{ | ||
"name": "datocms-structured-text-generic-html-renderer", | ||
"version": "0.1.0-alpha.9", | ||
"version": "0.1.0-alpha.10", | ||
"description": "A set of Typescript types and helpers to work with DatoCMS Structured Text fields", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "fbd819fff710650d8a1cacfea8b05fa860037dfe" | ||
"gitHead": "c99e901363cfd6e1f884bb7e91607a98cea09a38" | ||
} |
Sorry, the diff of this file is not supported yet
10625
85