From 7aa99a218c293ebcb20950bf212c6590d921c3d8 Mon Sep 17 00:00:00 2001 From: MihaiAnca13 Date: Sun, 4 Oct 2020 18:49:40 +0100 Subject: [PATCH] Allow link to other pages in table entry --- src/parse-table.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/parse-table.js b/src/parse-table.js index a49f0c0..e67e497 100644 --- a/src/parse-table.js +++ b/src/parse-table.js @@ -89,6 +89,18 @@ column with id "${propertyId}" is used`) * @property {number} lastEditedTime */ + /** + * Check if page is actually link and replace if necessary. + */ + pagesValid.forEach(page => { + if (page.title[0][1]) { + let title = page.title[0][1][0][1]['title']; + let uri = page.title[0][1][0][1]['uri']; + page.title = title; + page.uri = uri; + } + }) + /** * @type {PageMetadata[]} */ @@ -335,4 +347,4 @@ function renderIconToHTML(icon) { } else { return icon ? `${icon}` : '' } -} \ No newline at end of file +}