Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments to explain what the formatter.js file does #207

Open
PaulRBerg opened this issue Dec 12, 2024 · 0 comments
Open

Add comments to explain what the formatter.js file does #207

PaulRBerg opened this issue Dec 12, 2024 · 0 comments
Labels
effort: low Easy or tiny task that takes less than a day. priority: 2 We will do our best to deal with this. type: docs Changes to documentation. work: clear Sense-categorize-respond. The relationship between cause and effect is clear.

Comments

@PaulRBerg
Copy link
Member

It's not immediately obvious what this code does:

docs/formatter.js

Lines 3 to 10 in 1c7d804

async function formatGasBenchmark() {
const filePath = 'docs/contracts/v2/05-gas-benchmarks.md';
const markdownContent = await fs.readFile(filePath, 'utf8');
const formattedContent = markdownContent.replace(/\b\d+\b/g, (match) => {
return parseInt(match).toLocaleString('en-US');
});
await fs.writeFile(filePath, formattedContent);
}

@PaulRBerg PaulRBerg added priority: 2 We will do our best to deal with this. effort: low Easy or tiny task that takes less than a day. type: docs Changes to documentation. work: clear Sense-categorize-respond. The relationship between cause and effect is clear. labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: low Easy or tiny task that takes less than a day. priority: 2 We will do our best to deal with this. type: docs Changes to documentation. work: clear Sense-categorize-respond. The relationship between cause and effect is clear.
Projects
None yet
Development

No branches or pull requests

1 participant