docs-and-graphs
Advanced tools
Comparing version 0.1.18 to 0.1.19
{ | ||
"name": "docs-and-graphs", | ||
"version": "0.1.18", | ||
"version": "0.1.19", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -65,13 +65,13 @@ import yaml from 'js-yaml' | ||
const { inlineAsArray } = options | ||
const as = inlineAsArray ? (x) => x : arrayToObject | ||
const newData = extractInlineFields(value). | ||
map(({ chunks, raw }) => chunks.length > 1 | ||
? as(chunks.map(maybeNormalize)) | ||
: []) | ||
const data = currentNode.data ?? [] | ||
const data = [...currentNode.inlineFields ?? [], ...newData] | ||
for (const { chunks, raw } of extractInlineFields(value)) { | ||
if (chunks.length > 1) { | ||
data.push(as(maybeNormalize(chunks))) | ||
} | ||
} | ||
if (data.flat().length) { | ||
if (data.length) { | ||
currentNode.data = data | ||
@@ -78,0 +78,0 @@ } |
@@ -26,3 +26,5 @@ import { expect } from 'expect' | ||
'a::b::c\na::f::d', | ||
'Several lines\na::b\na::f' | ||
'before\na::b\na::f', | ||
'a::b\nbetween\nc::d', | ||
'a::b\nc::d\nafter' | ||
] | ||
@@ -29,0 +31,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
278092
5881