Skip to content

Commit a89f091

Browse files
committed
Update dist
1 parent 573a4b1 commit a89f091

File tree

5 files changed

+63
-4768
lines changed

5 files changed

+63
-4768
lines changed

dist/hlint/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ const HLINT_SEV_TO_GITHUB_SEV = {
3434
Ignore: 'warning',
3535
};
3636
/**
37-
* Use JSON escaping to turn messages with newlines and such into a single line.
37+
* Use JSON escaping to turn convert literal newlines to Github Action-supported newlines.
3838
*/
3939
function escapeString(str, quote) {
40-
const jsonEscaped = JSON.stringify(str).replace(/\n/g, ' ');
40+
const jsonEscaped = JSON.stringify(str).replace(/\n/g, '%0A');
4141
// Possibly drop the surrounding quotes
4242
return quote ? jsonEscaped : jsonEscaped.slice(1, jsonEscaped.length - 1);
4343
}
4444
/**
4545
* Combine the non-"poblemMatcher" fields of an "idea" into
4646
* a single line as a human-readable message.
4747
*
48-
* Fields are visually separated by a box character (' ▫︎ ').
48+
* Fields are visually separated by newlines.
4949
*/
5050
function getNiceMessage(idea) {
5151
const prefixParts = [];
@@ -68,7 +68,7 @@ function getNiceMessage(idea) {
6868
if (idea.note && idea.note.length) {
6969
messageParts.push(`Note: ${idea.note.map(n => escapeString(n, false)).join(' ')}`);
7070
}
71-
const message = messageParts.join(' ▫︎ ');
71+
const message = messageParts.join('%0A');
7272
return [prefix, message].filter(Boolean).join(': ');
7373
}
7474
function toMatchableProblem(idea) {

0 commit comments

Comments
 (0)