diff --git a/benchmark-compare.js b/benchmark-compare.js index 16c8af71..f717d9e9 100644 --- a/benchmark-compare.js +++ b/benchmark-compare.js @@ -57,7 +57,7 @@ function updateReadme () { ${compareResults(true)} ` const md = readFileSync('README.md', 'utf8') - writeFileSync('README.md', md.split('# Benchmarks')[0] + benchmarkMd, 'utf8') + writeFileSync('README.md', md.split('# Benchmarks', 1)[0] + benchmarkMd, 'utf8') } function compareResults (markdown) { diff --git a/metrics/process-results.cjs b/metrics/process-results.cjs index 427db7fd..cb0d1b94 100644 --- a/metrics/process-results.cjs +++ b/metrics/process-results.cjs @@ -18,7 +18,7 @@ function updateReadme (startupResults) { ${startupResults} ` const md = fs.readFileSync('METRICS.md', 'utf8') - fs.writeFileSync('METRICS.md', md.split('# Metrics')[0] + benchmarkMd, 'utf8') + fs.writeFileSync('METRICS.md', md.split('# Metrics', 1)[0] + benchmarkMd, 'utf8') } const results = fs.readdirSync(__dirname).filter((x) => x.endsWith('.txt'))