pressbooks-book
pressbooks-book copied to clipboard
Automatic <p> tags after first paragraph in table cells with multiple paragraphs
Description
In a standard (not Tablepress) table cell containing multiple paragraphs, the first paragraph is given a default, appropriate font unless specified. It is not automatically placed within <p>
tags. All subsequent paragraphs, however, are automatically placed within <p>
tags in the webbook output. This happens without any user intervention in the Text editor, and it gives additional paragraphs a different, unexpected font:
Code in Text editor
Appearance in webbook
Webbook HTML
This seems to happen regardless of the book's Theme (tested with McLuhan, Malala, Adunis, Andreessen).
A cumbersome workaround is to place every paragraph in a table within appropriately styled <p>
tags. The default <p>
tags are likely not hoped for in the context of a multi-paragraph table cell. Their automatic inclusion from the second paragraph onwards is experienced as a bug.
Steps to Reproduce
- In a book chapter, create a table with at least one cell.
- Write two or more paragraphs within that cell with no particular styling.
- Preview or save and view the chapter.
Expected behavior: All paragraphs have the same, appropriate font.
Actual behavior: All paragraphs after the first paragraph have a different, larger font.
This is affecting another client here: https://pressbooks.zendesk.com/agent/tickets/9399
Desired behaviour:
- all content inside td elements is treated the same way (wrapped in a p element)
- we appropriately target td p elements to display the way we want td content to display now
This is affecting another client here: https://pressbooks.zendesk.com/agent/tickets/13182