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
[WIP] Update showdown extensions #5167
Conversation
This PR is failing just on node v0.12 with the following error:
Seeing as |
Did a little bit of testing and found some problems with some of the escaping. The lists seem to escape correctly, but are formatted a little weird. I think the use case of someone escaping an entire list seems rare, but thought i would put it in there anyway. The most important fixes are the strikethrough, the img link, and the regular link using And the |
I've been sat staring at that screenshot going.... Wut? For the past 20minutes. Taking the first line as the major example, that's exactly the crazy crap this PR is meant to fix... and I have a test which shows that it does: Then it suddenly dawned on me.... I've only updated showdown on the server side, not on the client - if you publish the post - you should see COMPLETELY different results. Updating the PR now. |
closes TryGhost#5039, TryGhost#5028, TryGhost#4659, TryGhost#4627, TryGhost#4592, TryGhost#1501 This PR pulls in the new version of showdown + adds and updates some tests to show what has changed - Lots of additional whitespaces caused by a bad implementation of GFM newlines have been removed - One fix with newlines + pre tags is now undone, but is now closer to all other markdown handlers
Found a horrific bug in this, working on it 😞 |
Will reopen this when I've got it done properly |
WIP Notes:
The majority of the work for this PR actually lives in the showdown fork
This PR represents a significant change to the way that extensions are processed in showdown. The key to it all is that instead of parsing out code blocks and the like from individual extensions (and doing it differently in each one), I've moved that logic into showdown itself so that each extension can hook into it in it's own way.
Additionally, I've added ~2000 lines of tests for the extensions, covering them individually as well as in the combined form of
ghostgfm
. Although this is very thoroughly tested, there are no guarantees I didn't miss a whacky combination of markdown. Suggestions please!closes #5039, #5028, #4659, #4627, #4592, #1501
This PR pulls in the new version of showdown + adds and updates some tests to show what has changed