Ignore empty space when building link grids
This commit is contained in:
@@ -448,9 +448,9 @@ export const reduceLinks = (content: Parsed[]): Parsed[] => {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNewline(parsed) && buffer.length > 0) {
|
// Ignore newlines and empty space if we're building a grid
|
||||||
continue
|
if (isNewline(parsed) && buffer.length > 0) continue
|
||||||
}
|
if (isText(parsed) && !parsed.value.trim() && buffer.length > 0) continue
|
||||||
|
|
||||||
if (buffer.length > 0) {
|
if (buffer.length > 0) {
|
||||||
result.push({type: ParsedType.LinkGrid, value: {links: buffer.splice(0)}, raw: ""})
|
result.push({type: ParsedType.LinkGrid, value: {links: buffer.splice(0)}, raw: ""})
|
||||||
|
|||||||
Reference in New Issue
Block a user