dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Gfm renderer: Code formatting support

Open msink opened this issue 4 years ago • 6 comments

Should fix #1854 and #1970

Works for me, but no tests for now. Failed to find similar tests, are there any?

msink avatar Jun 14 '21 10:06 msink

"Shit in = Shit out".

Ok, let's start from the basics. Should KDoc PARSER conform to GFM Specification? If yes - currently it is wrong in 15 cases of 22, mostly missed or extra spaces.

Tests in #2029.

msink avatar Jul 20 '21 13:07 msink

We don't have any official spec (this is a work in progress) but I'd say that we should follow at least a Commonmark spec. Everything that works from GFM is a bonus

MarcinAman avatar Jul 21 '21 13:07 MarcinAman

GFM Spec is basically same as Commonmark spec, with added Tables and Strikethrough extensions. So for now - Dokka (KDoc parser) does not pass 70% of Commonmark spec tests.

msink avatar Jul 21 '21 14:07 msink

Most of missing things are small issues like white characters that are not game breaking, specially for a piece of software in alpha version

MarcinAman avatar Jul 21 '21 14:07 MarcinAman

Maybe it's tolerable (for alpha version) - but that was reaction to your comment about extra spaces in GFM renderer :) They comes from earlier stages of pipeline.

msink avatar Jul 21 '21 15:07 msink

@MarcinAman is there a follow up about this PR?

jimlyas avatar Sep 05 '21 04:09 jimlyas