From bfd6db71c2f4e160f1d73ad13d7591e1ccaa117b Mon Sep 17 00:00:00 2001 From: gilesb Date: Wed, 22 Nov 2023 21:56:22 +0000 Subject: [PATCH] fixed-links --- index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index 2c39371..5a208df 100644 --- a/index.js +++ b/index.js @@ -29897,7 +29897,7 @@ const findDisplay = (line, link) => { ); return external_fs_.promises.appendFile( fileName, - `\n[xml](${'../'.repeat(fileName.split('/').length)}${display.file}#L${l + 1})\n`, + `\n[xml](${'../'.repeat(fileName.split('/').length - 1)}${display.file.replaceAll(' ', '%20')}#L${l + 1})\n`, ); }, ) @@ -30051,7 +30051,7 @@ const findDisplay = (line, link) => { ); await external_fs_.promises.appendFile( fileName, - `\n[xml](${'../'.repeat(root.split('/').length)}${display.file})\n`, + `\n[xml](${'../'.repeat(root.split('/').length + 1)}${display.file.replaceAll(' ', '%20')})\n`, ); await reference_objects({ @@ -30236,7 +30236,7 @@ const findDisplay = (line, link) => { ); return external_fs_.promises.appendFile( fileName, - `\n[xml](${'../'.repeat(fileName.split('/').length)}${file}#L${objectLine + l})\n`, + `\n[xml](${'../'.repeat(fileName.split('/').length - 1)}${file.replaceAll(' ', '%20')}#L${objectLine + l})\n`, ).then(l + 1); }, ) @@ -30321,8 +30321,8 @@ const findDisplay = (line, link) => { -1, ); return external_fs_.promises.appendFile( - fileName, - `\n[xml](${'../'.repeat(fileName.split('/').length)}${global.file}#L${l + 1})\n`, + `${dir}/${object.id}.md`, + `\n[xml](${'../'.repeat(fileName.split('/').length - 1)}${global.file.replaceAll(' ', '%20')}#L${l + 1})\n`, ).then(() => l + 1); }, ) @@ -30392,6 +30392,10 @@ const findDisplay = (line, link) => { fileName, `# ${global.name}\n\nglobal\n`, ); + await external_fs_.promises.appendFile( + fileName, + `\n[xml](${'../'.repeat(root.split('/').length + 1)}${global.file.replaceAll(' ', '%20')})\n`, + ); await objects({ fileName, @@ -30402,10 +30406,6 @@ const findDisplay = (line, link) => { myObjectFields, displays, }); - await external_fs_.promises.appendFile( - fileName, - `\n## xml\n\n\`\`\`xml\n${global.xml()}\n\`\`\`\n`, - ); }), ); });