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

Fixes for blank last cell in table #120

Closed
wants to merge 1 commit into from

Conversation

JohnPickerill
Copy link

The original code uses a split on \n to divide the block into rows and a split on pipe to divide each row into cells.
Markdown however optionally allows leading and trailing pipes on each row so these have to be removed before the split otherwise spurious cells will be created. Similarly if there is a \n at the end of the block this also has to be removed to prevent a spurious row being generated.
Unfortunately the original code for removing the final \n also removes the final pipe. This does not matter if the final cell is not blank but if it is then another pipe will be removed when the row is processed leading to the final cell of the table not being generated. This fix changes the regex so that only the final \n is removed.

@lepture
Copy link
Owner

lepture commented Jan 17, 2017

I will dig into it later. But your solution is not good enough, close it for now.

@lepture lepture closed this Jan 17, 2017
@bdharrington7
Copy link

Why is this not good enough for #118?

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.

3 participants