racket / scribble

Other
197 stars 90 forks source link

documenting forms: disallow empty box #287

Closed sorawee closed 3 years ago

sorawee commented 3 years ago

Forms like deftogether and defproc* currently allow empty spec, causing an empty box to be rendered. These malformed outputs are better prevented at compile-time.

defform* already disallows empty spec, but the error is reported in terms of defform*/subs, so this PR adjusts it to directly error in terms of defform*. defsubform* still unfortunately errors in terms of defform*, but the fix is too invasive to be worth it.

This PR is tested against all docs in the main distribution. There's no error.

sorawee commented 3 years ago

The latest commit documents the previously undocumented defthing* and adjusts defthing* to disallow empty box.

Here's the rendered doc.