Adding Markdown to Ddoc

Ecstatic Coder ecstatic.coder at gmail.com
Sat Dec 16 19:54:13 UTC 2017


On Wednesday, 6 December 2017 at 09:33:47 UTC, Sönke Ludwig wrote:
> Am 06.12.2017 um 05:11 schrieb Walter Bright:
>> https://help.github.com/articles/basic-writing-and-formatting-syntax/
>> 
>> Anyone interested in picking up the flag?
>> 
>> (I know this has come up before, and I've been opposed to it, 
>> but I've changed my mind.)
>
> This is great news! While I don't have the time to work on this 
> directly, I can offer vibe.d's Markdown module* (re-licensing 
> as necessary): 
> https://github.com/vibe-d/vibe.d/blob/master/textfilter/vibe/textfilter/markdown.d
>
> Markdown is a strange thing to parse in the classical way due 
> to its original regex-cascade style of implementation/design, 
> so it was kind of difficult to find representations that allow 
> reasonably efficient and comprehensible processing.
>
> * There is also "dmarkdown", which is just a fork of the vibe.d 
> code

For those interested, I've also written a parser for a 
Markdon-like syntax (Pendown). You can find it here :

https://github.com/senselogic/PENDOWN

Yeah I know, everybody is gonna say "why reinvent Markdown, it's 
already perfect, it's the best invention since Cherry Coke, etc".

But sorry, obviously it wasn't perfect for my needs. I was REALLY 
tired of several flaws and limitations in the Markdown syntax, so 
I wrote this tool and quickly converted all my Mardown files to 
the Pendown format.

Maybe some people won't like its syntax because it's NOT a 
Markdown clone, but I use it all the time for all my personal 
notes, and now I would NEVER switch back to Markdown. I use it 
even for those notes I eventually need to print on paper actually.

Personally I mostly use the JavaScript version by editing an HTML 
document, but the D version could be what you are looking for, 
used as a tool or as a library.

As usual, I've made the code as simple as it could be, and it's 
licensed under the GPL3, so maybe you should have a look at it 
before deciding to use the well-known (but far from perfect) 
Markdown syntax.




More information about the Digitalmars-d mailing list