Skip to content

Commit 4446bc3

Browse files
committed
fix(report): update regex pattern to include more separator lines
1 parent df5059d commit 4446bc3

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

dist/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ exports.computeDiffs = exports.loadReports = exports.variation = void 0;
432432
const orderBy_1 = __importDefault(__nccwpck_require__(94791));
433433
const minimatch_1 = __nccwpck_require__(4501);
434434
const reportHeaderRegex = /^\| .+:.+ contract +\|/gi;
435-
const reportSeparatorRegex = /^[\|╭╰]---/;
435+
const reportSeparatorRegex = /^(?:[\|╭╰+][-=]+|\|[\s|]+$)/;
436436
const variation = (current, previous) => {
437437
const delta = current - previous;
438438
return {

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/report.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Minimatch } from "minimatch";
44
import { DiffReport, GasReport, SortCriterion, SortOrder } from "./types";
55

66
const reportHeaderRegex = /^\| .+:.+ contract +\|/gi;
7-
const reportSeparatorRegex = /^[\|]---/;
7+
const reportSeparatorRegex = /^(?:[\|+][-=]+|\|[\s|]+$)/;
88

99
export const variation = (current: number, previous: number) => {
1010
const delta = current - previous;

tests/mocks/gas_report.2.ansi

+3-1
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,13 @@ Running 17 tests for test-foundry/compound/TestWithdraw.t.sol:TestWithdraw
318318
Test result: ok. 17 passed; 0 failed; finished in 118.90s
319319
╭-----------------------------------------------------------------+-----------------+-------+--------+-------+---------╮
320320
| contracts/compound/IncentivesVault.sol:IncentivesVault Contract | | | | | |
321-
|-----------------------------------------------------------------|-----------------|-------|--------|-------|---------|
321+
+======================================================================================================================+
322322
| Deployment Cost | Deployment Size | | | | |
323323
|-----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
324324
| 640594 | 3430 | | | | |
325325
|-----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
326+
| | | | | | |
327+
|-----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
326328
| Function Name | min | avg | median | max | # calls |
327329
|-----------------------------------------------------------------+-----------------+-------+--------+-------+---------|
328330
| MAX_BASIS_POINTS | 305 | 305 | 305 | 305 | 1 |

0 commit comments

Comments
 (0)