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

Fix report header regex for shorter contract names #182

Merged
merged 2 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.computeDiffs = exports.loadReports = exports.variation = void 0;
const orderBy_1 = __importDefault(__nccwpck_require__(94791));
const minimatch_1 = __nccwpck_require__(4501);
const reportHeaderRegex = /^\| .+:.+ contract \|/;
const reportHeaderRegex = /^\| .+:.+ contract +\|/;
const variation = (current, previous) => {
const delta = current - previous;
return {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Minimatch } from "minimatch";

import { DiffReport, GasReport, SortCriterion, SortOrder } from "./types";

const reportHeaderRegex = /^\| .+:.+ contract \|/;
const reportHeaderRegex = /^\| .+:.+ contract +\|/;

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