Skip to content

Commit 6348ba3

Browse files
committed
fix(utils): literal asterisk in Markdown doc should be escaped
1 parent b0ce212 commit 6348ba3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/utils/src/lib/reports/__snapshots__/report-diff-added.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
|🏷️ Category|⭐ Current score|⭐ Previous score|🔄 Score change|
88
|:--|:--:|:--:|:--:|
99
|Bug prevention|🟡 **63**|🟡 68|![🠋 −5](https://img.shields.io/badge/%F0%9F%A0%8B%20%E2%88%925-red)|
10-
|Performance|🟢 **94**|_n/a (*)_|_n/a (*)_|
10+
|Performance|🟢 **94**|_n/a (\*)_|_n/a (\*)_|
1111
|Code style|🟡 **54**|🟡 54||
1212

13-
_(*) New category._
13+
_(\*) New category._
1414

1515
## 🎗️ Groups
1616

packages/utils/src/lib/reports/generate-md-reports-diff.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ function formatDiffCategoriesSection(diff: ReportsDiff): string {
8585
...added.map(category => [
8686
category.title,
8787
formatScoreWithColor(category.score),
88-
style('n/a (*)', ['i']),
89-
style('n/a (*)', ['i']),
88+
style('n/a (\\*)', ['i']),
89+
style('n/a (\\*)', ['i']),
9090
]),
9191
...unchanged.map(category => [
9292
category.title,
@@ -97,7 +97,7 @@ function formatDiffCategoriesSection(diff: ReportsDiff): string {
9797
].map(row => (hasChanges ? row : row.slice(0, 2))),
9898
hasChanges ? ['l', 'c', 'c', 'c'] : ['l', 'c'],
9999
),
100-
added.length > 0 && style('(*) New category.', ['i']),
100+
added.length > 0 && style('(\\*) New category.', ['i']),
101101
);
102102
}
103103

0 commit comments

Comments
 (0)