-
-
Notifications
You must be signed in to change notification settings - Fork 981
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
… for Pandoc >= 3.2.1 may also close #2566
- Loading branch information
Showing
4 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Type: Package | ||
Package: rmarkdown | ||
Title: Dynamic Documents for R | ||
Version: 2.27.1 | ||
Version: 2.27.2 | ||
Authors@R: c( | ||
person("JJ", "Allaire", , "[email protected]", role = "aut"), | ||
person("Yihui", "Xie", , "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0645-5666")), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--[[ | ||
Add classes 'odd' (or 'header' in table header) / 'even' to table rows | ||
]] | ||
|
||
local function add_odd_even (rows, odd) | ||
odd = odd or 'odd' | ||
for rownum, row in ipairs(rows) do | ||
row.classes:insert((rownum % 2) == 0 and 'even' or odd) | ||
end | ||
return rows | ||
end | ||
|
||
function Table (tbl) | ||
add_odd_even(tbl.head.rows, 'header') | ||
for _, tblbody in ipairs(tbl.bodies) do | ||
add_odd_even(tblbody.body) | ||
end | ||
add_odd_even(tbl.foot.rows) | ||
return tbl | ||
end |