From 8e9110e9f6c8244fe3464f545da0017f7e85914b Mon Sep 17 00:00:00 2001 From: gilesb Date: Wed, 22 Nov 2023 22:11:29 +0000 Subject: [PATCH] ... --- index.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/index.js b/index.js index 5a208df..9979360 100644 --- a/index.js +++ b/index.js @@ -29638,17 +29638,18 @@ const getMin = (number) => { ); const references = myDisplayFields(display) .displayReferences(); - await sequence( - references - .map( - (reference) => () => external_fs_.promises.appendFile( - fileName, - `* [${reference}](${reference.split('.')[0]}.md#${reference.split('.')[1].toLowerCase()})\n`, + if (references.length) { + console.log({ displayRef: fileName }); + await sequence( + references + .map( + (reference) => () => external_fs_.promises.appendFile( + fileName, + `* [${reference}](${reference.split('.')[0]}.md#${reference.split('.')[1].toLowerCase()})\n`, + ), ), - ), - ); - - if (!references.length) { + ); + } else { await external_fs_.promises.appendFile( fileName, '*[none]*\n', @@ -30008,6 +30009,7 @@ const findDisplay = (line, link) => { const references = myDisplayFields(display) .globalReferences(); if (references.length) { + console.log({global: fileName}); await sequence( references .map( @@ -30394,7 +30396,7 @@ const findDisplay = (line, link) => { ); await external_fs_.promises.appendFile( fileName, - `\n[xml](${'../'.repeat(root.split('/').length + 1)}${global.file.replaceAll(' ', '%20')})\n`, + `\n[xml](${'../'.repeat(root.split('/').length + 2)}${global.file.replaceAll(' ', '%20')})\n`, ); await objects({