-
Notifications
You must be signed in to change notification settings - Fork 886
Table inline code #437
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
Table inline code #437
Conversation
markdown/extensions/tables.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be named _row_has_unpaired_backticks
, as this really has little to do with code.
In general the idea looks good to me 👍, though I have left some comments on the code style issues. Travis fails on Coverage check on Python 3.2 because Coverage doesn't seem to support that version, should we maybe exclude that check from the Travis config? |
Interesting. What about when multiple backticks are used to delimit a codespan? Might want to add to the test some more cells:
Note that each of the first three should result in the following HTML:
And the last three:
|
markdown/extensions/tables.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the coverage report, this is never tested. Might want to add a test for it.
Yes, Coverage 4.0 does not support Python 3.2. We could require Coverage 3.x, but I don't really think it matters much at this point. |
@MustafaHaddara, @mitya57 already pointed out the specific issues to you, but the Flake8 test shows all those style/formatting related issues for you as well. |
@MustafaHaddara this looks like a good start. When the multiple backticks issue gets worked out, either @mitya57 or I will merge it. Thanks for the report and getting the work started on this. |
markdown/extensions/tables.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Flake8 test is indicating this has trailing whitespace.
markdown/extensions/tables.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't do this. Lets keep all inline parsing in the inline parsing step of the parser. If you want to use the regex for codespans to identify them, I understand, but when the table blockparser is done, the cell should still contain Markdown formatted inline text. If you don't do it that way, then other (inline) extensions could fail in unpredictable ways on table cells with codespans.
@waylan @mitya57 fixed as requested. All tests pass for me. Speaking of tests, I didn't notice there was already some tables tests in And would you like me to rebase and squash all of these commits into one commit to encompass the entire patch? |
The tables extension is part of extra, so yes I would prefer the tests be under |
markdown/extensions/tables.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you're not using match.end(group)
here?
Every thing else looks good to me.
@waylan In response to your point about What we really want is the beginning of the text outside the code block, ie. Please review, and if it is good with you I'll rebase into one commit. |
Looks good. Clean up the Flake8 errors and rebase and I'll merge. |
The Flake8 test didn't run, and I'm not sure why. It threw Is there a more detailed log I can look at somewhere? |
The Travis Report (linked below) shows the details for each build. Just select the failing build and it will give you a full log. As per our earlier discussion, you can ignore the Python 3.2 build due to a version incompatibility with Coverage. |
b2db71a
to
fb65ed1
Compare
Rebased, all ready to go. |
There's probably a better way to do this -- I feel like
tables.py
should import frominlinepatterns
or something like that.Tests passed, and I added 4 tests for tables. On the
master
branch, the first 3 pass. These commits get the 4th one working.Resolves #436