-
-
Notifications
You must be signed in to change notification settings - Fork 265
Work around a nested list formatting bug in the default markdown parser #98
Conversation
On Tue, May 14, 2013 at 09:33:20AM -0700, Jonathan Cooper wrote:
To get started on the completely wrong foot, it's good to have a Back to the main topic. Since the Maruku issue is closed and stagnant, I'm in favor of this |
Reading around online, it seems that if we're switching from Jekyll's default markdown parser (maruku), we might as well upgrade ourselves all the way to redcarpet, which is the basis for GitHuB Flavored Markdown, including code fence syntax highlighting. I don't think we'll get auto-linking to github issues/commits/etc, but it's the parser that we interact with daily on GitHub. It looks like redcarpet (version 2.2.2), is available from the Jekyll used by GitHub Pages, and it matches best with everyone's Markdown expectations. |
@wking I'm guessing running git commit --amend to fix the commit message isn't going to play happily with the pull request open? Happy to add another commit switching to redcarpet if that is preferred. |
@jonc125 - it's no problem to fix your branch however you want and force push a new branch with the same name. GitHub will do the right thing. My vote is for redcarpet but perhaps we should ping @jiffyclub, since I believe he set these pages up originally. I like @wking's suggestion to diff the html outputs, is there a script lying around somewhere that generates the html? |
Here's a summary of what I've found so far: First off, the new way to build with recent versions of jekyll is just:
This will populate the Second, as far as I can tell, there are many minor differences between the way the parsers handle things: https://gist.github.com/ahmadia/5605072 Notably:
Ignorably:maruku doesn't preserve line breaks in the Markdown source, uglifying the HTML somewhat ConclusionI am going to leave this pull request open for a bit more (it needs to be rebased before merge). The bugs in maruku are prominent enough to prompt a change in parsers. I recommend that we switch to redcarpet for better integration with the GitHub experience, I don't think rdiscount would be a bad choice, but it doesn't have any strong advantages over redcarpet that I'm aware of. |
I think switching to redcarpet would probably be fine. |
Hmm, I seem to have rather complicated the history here! I was trying to do Aron's rebase suggestion on a transatlantic flight. Shall I try to clean it up, or will it merge OK as-is? |
It definitely needs to be cleaned up before we merge. Can you do something along the lines of:
This will give you a clean commit descending from the latest commit in master. I haven't heard any howls we'll merge this in as soon as it hits. |
The default maruku parser has an issue with nested lists; see bhollis/maruku#64 for details. Using the rdiscount parser instead worked for the Oxford DTC boot camp.
There, that looks better. |
Substantially. Merged |
Work around a nested list formatting bug in the default markdown parser
Whew. Thanks for sticking through this one @jonc125. I hope you'll stick around a bit to help out with improving some other aspects of the content :) |
This isolates the single fix from pull request #97.
See bhollis/maruku#64 for original bug.
Using the rdiscount parser instead worked for the Oxford DTC boot camp.