File tree Expand file tree Collapse file tree 5 files changed +63
-4768
lines changed Expand file tree Collapse file tree 5 files changed +63
-4768
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,18 @@ const HLINT_SEV_TO_GITHUB_SEV = {
34
34
Ignore : 'warning' ,
35
35
} ;
36
36
/**
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 .
38
38
*/
39
39
function escapeString ( str , quote ) {
40
- const jsonEscaped = JSON . stringify ( str ) . replace ( / \n / g, ' ' ) ;
40
+ const jsonEscaped = JSON . stringify ( str ) . replace ( / \n / g, '%0A ' ) ;
41
41
// Possibly drop the surrounding quotes
42
42
return quote ? jsonEscaped : jsonEscaped . slice ( 1 , jsonEscaped . length - 1 ) ;
43
43
}
44
44
/**
45
45
* Combine the non-"poblemMatcher" fields of an "idea" into
46
46
* a single line as a human-readable message.
47
47
*
48
- * Fields are visually separated by a box character (' ▫︎ ') .
48
+ * Fields are visually separated by newlines .
49
49
*/
50
50
function getNiceMessage ( idea ) {
51
51
const prefixParts = [ ] ;
@@ -68,7 +68,7 @@ function getNiceMessage(idea) {
68
68
if ( idea . note && idea . note . length ) {
69
69
messageParts . push ( `Note: ${ idea . note . map ( n => escapeString ( n , false ) ) . join ( ' ' ) } ` ) ;
70
70
}
71
- const message = messageParts . join ( ' ▫︎ ' ) ;
71
+ const message = messageParts . join ( '%0A ' ) ;
72
72
return [ prefix , message ] . filter ( Boolean ) . join ( ': ' ) ;
73
73
}
74
74
function toMatchableProblem ( idea ) {
You can’t perform that action at this time.
0 commit comments