From 95297f6a0b02bc864e2a1a3830d742f96daaba8d Mon Sep 17 00:00:00 2001 From: DhairyaSethi <55102840+DhairyaSethi@users.noreply.github.com> Date: Wed, 6 Dec 2023 15:17:52 +0530 Subject: [PATCH] fix: rm list and table when none --- generateMarkdown.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/generateMarkdown.js b/generateMarkdown.js index f0662c0..1bfa5d2 100644 --- a/generateMarkdown.js +++ b/generateMarkdown.js @@ -247,11 +247,10 @@ function generateDeploymentHistory(history, latest, chainId) { Deployed contracts: - - ${contractInfos + ${contractInfos.length > 1 ? `- `: ``}${contractInfos .map( - ({ contract, contractName }) => ` -
- ${contractName.replace(/([A-Z])/g, " $1").trim()}${ contract.proxyType @@ -268,15 +267,15 @@ function generateDeploymentHistory(history, latest, chainId) { "tx", )}">Initialization Txn)` : `` - } - ${ + } + ${ Object.keys(contract.input.constructor).length - ? ` + ? ` - - - - + + + + ${Object.entries(contract.input.constructor) .map( ([key, value]) => ` @@ -298,10 +297,9 @@ function generateDeploymentHistory(history, latest, chainId) { ` : `` } - - `, + ${Object.keys(contract.input.constructor).length ? ``: ``}`, ) - .join("\n- ")} + .join("\n - ")} `, ) .join("\n\n");
ParameterValue
ParameterValue