Skip to content

Commit

Permalink
Simpler ignoreComments
Browse files Browse the repository at this point in the history
Thanks copilot!
  • Loading branch information
matschaffer committed Jun 16, 2022
1 parent 050ac63 commit 1c45233
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TestMetricReader extends MetricReader {
}

function ignoreComments(result: string): string {
return result.split("\n").filter((line) => !line.startsWith('#')).join("\n");
return result.replace(/^#.*\n/gm, '');
}

describe('PrometheusSerializer', () => {
Expand Down

0 comments on commit 1c45233

Please sign in to comment.