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

Fix regression of single column tables #540

Merged
merged 1 commit into from Jan 26, 2017
Merged

Fix regression of single column tables #540

merged 1 commit into from Jan 26, 2017

Conversation

facelessuser
Copy link
Collaborator

Single column tables are valid tables, so add back in the accidentally
removed functionality of allowing single column tables, but with one
exception -- table bodies should not render empty.

As discussed in #539, tables with no bodies are given an empty row. This affects both single column tables and multi-column alike.

One side note. PHP extra states that each row should have | in single columns. So I enforce that. The reason behind this is how they handle the first pipe in a row. Their consumption logic is a bit different and beyond the scope of this. I added things like PIPE_LEFT etc. in case we want to address it in the future. The short is that if the header has a leading pipe, the first pipe is stripped. If it doesn't have a leading pipe, the pipe is used on that row as plain text. It isn't described in their spec that I could see, and we didn't support it before, but since it explicitly states you need at least 1 pipe, I enforce that, but leave the possibility to add Extra like pipe consumption enhancements.

Single column tables are valid tables, so add back in the accidentally
removed functionality of allowing single column tables, but with one
exception -- table bodies should not render empty.
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.

None yet

2 participants