-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't emit unnecessary classes in HTML tables (#9325) #9376
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ThomasSoeiro ! I'm really sorry to have let this sit for so long. It must have come in during a busy period and then it was buried. But this all looks good to me, I think you could "undraft" it.
And yes, I'd say those other things should also be updated for consistency. |
hi @jgm!
Done, thank you for having a look!
Sorry, I won't be able to take care of it for several weeks. |
Thanks, I'll just merge this and take care of the other thing separately. |
The removal of odd/even is a bit of a breaking change for us. We were relying on that to produce pretty HTML tables with alternating lines. It may be possible to use the CSS |
@Malcolmnixon: Lua filter to restore the old behavior: local function add_odd_even (rows)
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)
for _, tblbody in ipairs(tbl.bodies) do
add_odd_even(tblbody.body)
end
add_odd_even(tbl.foot.rows)
return tbl
end |
Here is a try for #9325 according to @jgm guidance :
header
/odd
/even
classes indata/templates/styles.html
.header
/odd
/even
accross the tests; I'm not sure about changes inupdate test/command/*.md
so I put it in a separate commit.I also found occurence of
odd
/even
in:pandoc-lua-engine/test/sample.lua
andpandoc-lua-engine/test/tables.custom
/src/Text/Pandoc/Writers/Textile.hs
andtest/tables.textile
Do they need updating too?
PS: This is my first pull request. It is only WIP but I hope it helps. Otherwise, feel free to close!