Am 19.02.2019 um 11:36 schrieb zoujiaqing:
hunt-markdown is powerfull markdown spec parsing and randering library for Dlang. It's fast and clean. Api design like java's commonmark library.

example code:
```import hunt.markdown.node.Node;
import hunt.markdown.parser.Parser;
import hunt.markdown.renderer.html.HtmlRenderer;

Parser parser = Parser.builder().build();
Node document = parser.parse("This is *New*");
HtmlRenderer renderer = HtmlRenderer.builder().build();
renderer.render(document);  // "<p>This is <em>New</em></p>\n"
```

More markdown spec like this:
https://spec.commonmark.org/0.28/


Github reposirory:
https://github.com/huntlabs/hunt-markdown

Since the code appears to be a direct port from Atlassian's library, you should also include the BSD license file, including the original copyright notice (https://github.com/atlassian/commonmark-java/blob/master/LICENSE.txt). Not sure whether the Apache-2.0 license that is set in dub.sdl is compatible.

Personally, I would also always explicitly mention the source project when doing a fork like this, since it can help a lot in terms of communicating the exposed API, as well as the code stability to be expected. Also, should the project stop being maintained at some point, the original project may still continue to be supported, so backporting changes can be an option. Since we are talking about server applications, tracking inherited security issues can also be important, so documenting the version/commit on which the port is based is also a good idea (probably most important for hunt-http etc.).

Reply via email to