WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@jrudolph
Copy link

@jrudolph jrudolph commented Jun 4, 2012

I don't know if this is controversial but it seems that knockoff supports just a subset of the usual markdown syntax. For example, I'm always wondering which link syntax works and how to have monospaced text etc.

Here's a simple conversion to pegdown which supports a wider range of markdown syntax.

@n8han
Copy link
Owner

n8han commented Jun 4, 2012

What, is there a decent markdown parser for the jvm finally? :)

I guess the argument for knockoff is that it's all in Scala, and that's neat, but also we can extend it in Scala. I've done a bit of that for Pamflet, to add fenced code blocks, smart quotes and em-dashes.
https://github.com/n8han/pamflet/tree/master/knockoff/src/main/scala

And that can be used by other projects, though I haven't integrated it with Herald yet. The best thing about the fenced code blocks is it's integrated with a javascript syntax highlighter, which I would be able to do for implicit.ly notes now that it's on tumblr.

What monospaced text format were you expecting, was it fenced code blocks?

I know about the links thing. It took me a while but I've internalized the format that tends to work with every markdown parser. Unfortunately, there is no standard for these things, just the original limited format defined by Gruber. :\

@jrudolph
Copy link
Author

jrudolph commented Jun 7, 2012

As far as I checked it knockoff knows no syntax of the code blocks, no backquotes, no triple backquotes, and no fences.

IIRC pegdown already has most of those features out of the box. What it currently doesn't do is support code blocks with the language flag set. I guess that wouldn't be too hard to add to pegdown's parser if it is a requirement.

And you are right about the missing standard. That makes things painful because the language has already so many possible extensions. A written grammar would have turned up how many possible ambiguities the language contains and would have given rise to some modifications which would allow easier parsing.

@n8han
Copy link
Owner

n8han commented Jun 7, 2012

As far as I checked it knockoff knows no syntax of the code blocks, no backquotes, no triple backquotes, and no fences.

Right, that's why I added this support, in these sources I linked to before. :)
https://github.com/n8han/pamflet/tree/master/knockoff/src/main/scala

@SethTisue
Copy link

fwiw, we've been using Pegdown for the past 2 years or so in NetLogo and we've been completely pleased with it.

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