[ocaml-infra] markdown in "pure" OCaml: testing phase

Philippe Wang philippe.wang at cl.cam.ac.uk
Fri Aug 9 17:48:54 BST 2013


On Aug 8, 2013, at 19:43 PM, Thomas Gazagnaire <thomas at ocamlpro.com> wrote:

>> unless I have forgotten some features, I think I have just finished implementing a whole Markdown to HTML converter, with original specs [1] in mind.
> 
> Great!

:-)
I think I have fixed what was missing (well, obviously I had forgotten a few features).

>> I have done very little testing on omd, so it might still have plenty of bugs, so I'm starting a testing phase now. So, very soon I shall make a release :-)
> 
> I advise you again to look at https://github.com/samoht/ocaml-cow/tree/WIP/lib_tests/md if you are looking for some tests.

Thanks, they have been very useful (in making me not sleep last night).
Two questions: 
1. is there a license? (I think they are already in my repo, Jeremy added a bunch of test files and I think that they're the same)
2. in url-with-parenthesis.md there is 
There's an [episode](http://en.memory-alpha.org/wiki/Darmok_(episode)) of Star Trek: The Next Generation
How do you end up with a URL that includes the first closing parenthesis? It is because you count the number of opening parentheses in the URL? Or does it naively take the farthest one before a space or newline or end-of-file?

Oh, I've just seen that it's the last test… It means I've almost finished the 1st testing pass.
I'll have to at least make a 2nd pass to check that I haven't broken anything while fixing other things.
Well, there's already that "paragraphs in lists" I have to fix. I don't quite understand the point in Markdown generating so many paragraphs...

>> If you want to try it out, your feedbacks will be welcome. Note that for the moment, the binary doesn't parse its arguments, so it's all about stdin and stdout.
> 
> If you want to make everybody happy, the simple 'extension point' mechanism is to add a way to add HTML tags to some word/paragraph (and a way to load css & javascript files in the generated HTML file). I've never seen any markdown engine doing this, but that would be incredibly useful (at least for me).
> […]

I'll reply to that later :-)

>> N.B. I'll probably add a table of contents extension, eventually.
> 
> You can be interested in https://github.com/mirage/ocaml-cow/blob/master/lib/markdown.ml#L456

I'll take a look at that… later. :-)

Cheers,
Philippe



More information about the Infrastructure mailing list