Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bokuweb committed Oct 22, 2023
1 parent ae8198e commit 54985f5
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,20 @@ const differences = ({ result, baseUrl }: { result: CompareOutput; baseUrl: stri
### Differences
| Actual | Expected | Difference |
|:----------:|:----------:|:----------:|
${result.failedItems
.map(item => {
const filename = encodeURIComponent(basename(item));
const base = basename(item);
const filename = encodeURIComponent(base);
const actual = baseUrl + 'actual/' + filename + '?raw=true';
const expected = baseUrl + 'expected/' + filename + '?raw=true';
const diff = baseUrl + 'diff/' + filename + '?raw=true';
return `| ![Actual](${actual}) | ![Expected](${expected}) | ![Difference](${diff})|`;
return `### \`${base}\`
| actual|![Actual](${actual}) |
|--|--|
|expected|![Expected](${expected})|
|difference|![Difference](${diff})|`;
})
.join('\n')}
`;
Expand Down Expand Up @@ -107,13 +111,17 @@ const deletedItems = ({ result, baseUrl }: { result: CompareOutput; baseUrl: str
### Deleted Items
| Deleted Items |
|:----------:|
${result.deletedItems
.map(item => {
const filename = encodeURIComponent(basename(item));
const base = basename(item);
const filename = encodeURIComponent(base);
const img = baseUrl + 'expected/' + filename + '?raw=true';
return `| ![Deleted](${img}) |`;
return `### \`${base}\`
| |
|--|
|![DeleteItem](${img})|
`;
})
.join('\n')}
`;
Expand Down

0 comments on commit 54985f5

Please sign in to comment.