dartdoc icon indicating copy to clipboard operation
dartdoc copied to clipboard

#4134. Add/update tests regarding whitespaces and interrupting lines

Open sgrekhov opened this issue 4 months ago • 1 comments

Some comments to this PR.

  • The updated test test_removesSpaceAfterTripleSlashes is failing. But the specification clearly states that

For each line that begins with ///, the parser removes the three slashes and all leading whitespace to produce the documentation text

So, I believe it is a bug in the current implementation. It should be fixed to follow the spec.

  • test_whitespacesInCodeSpan also fails. The spec says that whitespaces inside fenced code blocks should be preserved. But in this test we have a code span (`). Spec says that fenced code blocks are the only exception in all other cases all leading whitespaces should be removed. Therefore it is an implementation issue again.
  • The spec says "Exception: inside fenced code blocks (```)...". Github flavored markdown also supports ~~~ as begin/end of code blocks. Probably it makes sense to mention it to the spec. Say "Exception: inside fenced code blocks (``` or ~~~)...".

cc @srawlins because the change affects his comment.

sgrekhov avatar Dec 16 '25 12:12 sgrekhov

@szakarias @athomas please grant me the permission to assign reviewers.

sgrekhov avatar Dec 16 '25 12:12 sgrekhov

@szakarias @athomas please grant me the permission to assign reviewers.

Done

athomas avatar Dec 17 '25 14:12 athomas

@szakarias @athomas please grant me the permission to assign reviewers.

Done

Thanks!

sgrekhov avatar Dec 17 '25 15:12 sgrekhov

@szakarias @eernstg please review. Some checks failed with SubprocessException[command: "dart analyze --fatal-infos .", workingDirectory: "(null)", exitCode: 2, environment: {}] but it looks like an infra issue.

sgrekhov avatar Dec 19 '25 08:12 sgrekhov

I'll just remain aware of this work, perhaps adding a comment now and then, but not do regular full reviews.

eernstg avatar Dec 19 '25 10:12 eernstg