digitalmars.D.announce - hunt-markdown 1.0.0 released,
- zoujiaqing (16/16) Feb 19 2019 hunt-markdown is powerfull markdown spec parsing and randering
- Guillaume Piolat (2/18) Feb 19 2019 Very cool! I don't think we had a CommonMark parser.
- zoujiaqing (3/26) Feb 22 2019 Thanks for your support :)
- =?UTF-8?Q?S=c3=b6nke_Ludwig?= (16/36) Feb 19 2019 Since the code appears to be a direct port from Atlassian's library, you...
- zoujiaqing (6/22) Feb 20 2019 Thanks and agreed!
- Cym13 (16/32) Feb 23 2019 A cool addition would be a sanatizer to allow processing markdown
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
Feb 19 2019
On Tuesday, 19 February 2019 at 10:36:38 UTC, zoujiaqing wrote: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-markdownVery cool! I don't think we had a CommonMark parser.
Feb 19 2019
On Tuesday, 19 February 2019 at 12:22:29 UTC, Guillaume Piolat wrote:On Tuesday, 19 February 2019 at 10:36:38 UTC, zoujiaqing wrote:Thanks for your support :)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-markdownVery cool! I don't think we had a CommonMark parser.
Feb 22 2019
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-markdownSince 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.).
Feb 19 2019
On Tuesday, 19 February 2019 at 15:49:55 UTC, Sönke Ludwig wrote:Am 19.02.2019 um 11:36 schrieb zoujiaqing:Thanks and agreed! add origin project information. About license, DotNetty use netty APIs, but netty use Apache-2.0 and DotNetty use MIT license.[...]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.).
Feb 20 2019
On Tuesday, 19 February 2019 at 10:36:38 UTC, zoujiaqing wrote: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-markdownA cool addition would be a sanatizer to allow processing markdown provided by users in a secure way. Right now trying to build something like a forum supporting markdown would only end in lots of XSS everywhere. The end developer could probably create a sanatizer himself but: * security works best when the wheel isn't invented over and over again, such piece of software is hard to get right[1], better have a centralized effort * writting a sanitizer requires building a MD parser so it's worth baking it into the library (but with a way to disable it for trusted inputs). Otherwise, it would be good to mention that this is not fit to manage user inputs and should be kept server-side. [1]: http://danlec.com/blog/hacking-stackoverflow-com-s-html-sanitizer
Feb 23 2019