Skip to content

Support markdown syntax. #352

Closed
Closed
@jordwalke

Description

@jordwalke

Many in the web community use markdown syntax for their source documentation.

I know there is not a clean one to one mapping between markdown and ocamldoc syntax, but it would be nice to support even just the most basic markdown syntax.

A good way to tell if markdown syntax should be used is if the comments are of the form:

(**
 * This is a markdown comment. Typically people will always have leading
 * stars to the left, aligned in a perfect vertical line. That is probably pretty
 * well distinguished from a list of ocamldoc items.
 *)

I've noticed that most ocamldoc comments are of the form:

(** This is an ocamldoc comment. aslkdjf laskdjf lkasj dflkasj dflkasj df
    alsdkfj alskdjf lkasdj flkasj dflkaj sdflkj asdlkfj asdlfkj asd *)

Which allows you to pretty easily distinguish a list in ocamldoc format:

(** This is an ocamldoc comment
    * This is the first item in a list
    * Second item in a list *)

Is the markdown detection I suggested in the first example fairly robust?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions