Skip to content

Commit

Permalink
Fix the job summary table example
Browse files Browse the repository at this point in the history
This updates the example of adding a table to a job summary using
core.summary.addTable() to be correct. It also changes the data row to
use strings instead of objects to show both ways that cell data can be
defined. This mirrors the job summary announcement blog post.
  • Loading branch information
mcdonnnj committed Dec 5, 2024
1 parent b7a00a3 commit 5a6ce5c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,17 +451,17 @@ For example
```typescript
const tableData = [
{data: 'Header1', header: true},
{data: 'Header2', header: true},
{data: 'Header3', header: true},
{data: 'MyData1'},
{data: 'MyData2'},
{data: 'MyData3'}
[
{data: 'Header1', header: true},
{data: 'Header2', header: true},
{data: 'Header3', header: true}
],
['MyData1', 'MyData2', 'MyData3']
]
// Add an HTML table
core.summary.addTable([tableData])
// Output: <table><tr><th>Header1</th><th>Header2</th><th>Header3</th></tr><tr></tr><td>MyData1</td><td>MyData2</td><td>MyData3</td></tr></table>
core.summary.addTable(tableData)
// Output: <table><tr><th>Header1</th><th>Header2</th><th>Header3</th></tr><tr><td>MyData1</td><td>MyData2</td><td>MyData3</td></tr></table>
```

Expand Down

0 comments on commit 5a6ce5c

Please sign in to comment.