Swap showdown-ghost fork for markdown-it.#6352
Swap showdown-ghost fork for markdown-it.#6352nybblr wants to merge 17 commits intoTryGhost:masterfrom
Conversation
|
Investigating https://github.com/valeriangalliat/markdown-it-anchor for header anchors: It has:
|
8c092f8 to
8e954be
Compare
* <s> and <del> are considered equivalent, and carry the same styling by * default. Casper applies no styling.
* Showdown seems to be in the wrong here: to opt-in to HTML, most specs * require that a new line start with "<". Starting a line with regular * text, then inserting HTML in this case is undefined behavior.
|
4 specs failing, all related to the custom image placeholder functionality. All the other tests failed due to:
|
* Disable ![] image syntax, using ![]() instead. * Disable image footnotes (seems like a random edge case turned feature)
|
Dropped two edge case behaviors:
|
|
Test suite is passing locally, any thoughts on why Travis isn't running, @ErisDS or @acburdine? |
|
Not sure exactly why, I'd try fixing the merge conflicts and force-pushing and seeing if that triggers a build. Sometimes Travis has glitches 😄 |
|
Hi @nybblr, I appreciate you've spent some time on this, but it's really worth checking in with a big project like ours before trying to replace a major dependency. Our editor is, after all, our centre piece! We're currently in the process of replacing the editor. |
|
@ErisDS that looks neat, thanks for the link. I'm excited to see where the editor heads! Still, that seems a long way off (and in the interest of experimentation, could be awesome/not so awesome). This PR is a drop-in replacement that maintains feature parity, gets us off an outdated fork, and gives developers options to customize their markdown plugins. This would also immediately close most of these editor issues due to invalid markdown rendering: https://github.com/TryGhost/Ghost/labels/editor I think it would be a win-win to do something like this while we wait for that awesome new editor to be vetted, tested, and accepted into stable. And since some folks may inevitably not be crazy about the move from markdown, this would give them something to roll back too without being stuck on a buggy showdown fork. Thoughts? |
|
❤️ Markdown |
|
Regardless of which route we take, the editor will be whole-sale replaced within the next couple of months. It's our main ongoing project. I appreciate the desire to get off of the current showdown fork. There is an open issue for it: #5598 and it's something I was actively working on until recently. I can remove the 'in-progress' labels and someone else can look at doing this, but right now I don't see that there's justification for switching markdown libraries when the editor is about to change. To address some of the other comments/questions/concerns:
From viewing a couple of the changes to tests, it seems to me that this statement is factually incorrect.
Not sure how this is the case?
Just no. No, no no. And no. Trying to sell making this change as a way to encourage people not to upgrade Ghost in the future is so backwards its untrue. We're building a new, more powerful and more customisable editor to solve the problems with the existing one. |
There will be no need for users who are wed to markdown to move away from it, quite the opposite, the new editor will eventually allow drop-in replacement of markdown parsers/markdown editing interfaces. The move is towards a better default UX for non-technical users whilst also increasing flexibility and options for developers/power-users. |
|
@kevinansfield sounds rad. I can't imagine it's been easy. :) |
Swapping out showdown-ghost fork for markdown-it.
Quite a few plugins folks could plug and play beyond core: https://www.npmjs.com/browse/keyword/markdown-it-plugin
#6125
TODO: