@@ -108,21 +108,22 @@ export const typeDoc = async (command: Command): Promise<StepResponse> => {
108108 console . log ( "commandOutput: " , commandOutput ) ;
109109
110110 if ( response . error ) {
111- const lines = commandOutput . split ( "\n" ) ;
112- const table = lines
113- . map ( ( line ) => {
114- console . log ( "line: " , line ) ;
115- const match = line . match ( / ^ ( .* ) : ( \d + ) : ( \d + ) - ( .* ) $ / ) ;
116- console . log ( "match: " , match ) ;
117- if ( match ) {
118- const [ _ , file , line , column , message ] = match ;
119- return `<tr><td>${ file } </td><td>${ line } </td><td>${ column } </td><td>${ message } </td></tr>` ;
120- }
121- return "" ;
122- } )
123- . join ( "" ) ;
124- const outputStr = `<table><tr><th>File</th><th>Line</th><th>Column</th><th>Message</th></tr>${ table } </table>` ;
125- return await buildComment ( response , outputStr , command . label ) ;
111+ // const lines = commandOutput.split("\n");
112+ // const table = lines
113+ // .map((line) => {
114+ // console.log("line: ", line);
115+ // const match = line.match(/^(.*):(\d+):(\d+) - (.*)/);
116+ // console.log("match: ", match);
117+ // if (match) {
118+ // const [_, file, line, column, message] = match;
119+ // return `<tr><td>${file}</td><td>${line}</td><td>${column}</td><td>${message}</td></tr>`;
120+ // }
121+ // return "";
122+ // })
123+ // .join("");
124+ // const outputStr = `<table><tr><th>File</th><th>Line</th><th>Column</th><th>Message</th></tr>${table}</table>`;
125+ // return await buildComment(response, outputStr, command.label);
126+ return await buildComment ( response , commandOutput , command . label ) ;
126127 }
127128 return await buildComment ( response , "" , command . label ) ;
128129
0 commit comments