Skip to content
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

Revert change about formatting for Pandoc headerless simple table #1961

Closed
wants to merge 1 commit into from

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Nov 24, 2020

Close #1954 by revertgin the change in #1895 for #1894
This reverts commit e1aebef

Should we found another JS solution for #1894 or just document in NEWS.md that one could use

```{js, echo=FALSE}
$('table').addClass('table table-condensed'); 
```

to get the correct formatting for headerless table ?

@cderv cderv changed the title Revert change about formatting for "Pandoc headerless simple table are correctly formatting" Revert change about formatting for Pandoc headerless simple table Nov 24, 2020
@cderv cderv marked this pull request as ready for review November 24, 2020 14:05
@cderv cderv marked this pull request as draft November 24, 2020 14:10
@cderv
Copy link
Collaborator Author

cderv commented Nov 24, 2020

in fact this is not the issue with #1954 - Closing. I'll reopen if needed.

@cderv cderv closed this Nov 24, 2020
@@ -602,7 +602,7 @@ <h2 id="$idprefix$toc-title">$toc-title$</h2>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
$$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about finding tables that have either thead > tr.header or tbody > tr.odd as their children, and add the classes to them? Would that fix both problems?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect format for HTML tables
2 participants