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

colspanned columns should inherit tag #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

takuy
Copy link

@takuy takuy commented Nov 26, 2020

Colspanned columns need to inherit the tag of the original column. Otherwise, in a header row, this leaves you with a bunch of th tags separated by tds tags (since the default is to treat an empty tag as td per

$last = ($meta[$row][$col]['tag'] == 'th') ? '^' : '|';
)

When the array is parsed by build_table, this means the table is actually malformed per DokuWiki syntax and what should be a ^ ends up being a |; this later generates bad or unexpected HTML - th elements end up in tbody instead of thead.

Colspanned columns need to inherit the tag of the original column. Otherwise, in a header row, this leaves you with a bunch of `th` tags separated by `tds` tags (since the default is to treat an empty tag as `td` per https://github.com/cosmocode/edittable/blob/09298eaff7a6ebcb9892511587fac055380c5653/action/editor.php#L222)

When the array is parsed by build_table, this means the table is actually malformed per DokuWiki syntax and what should be a `^` ends up being a `|`; this later generates bad or unexpected HTML - `th` elements end up in `tbody` instead of `thead`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant