Stop eating spaces that immediately follow @[source], @[evaluate] or @[include] directives on the same line, while unindenting.
Also fix docs.md so its example isn't asking for line-wrapping.
Currently Unison takes doc literals like
[:
example usage:
- note the call to bar
- we pass it 1
foo =
bar 1
baz
:]
and renders them as
[: example usage:
- note the call to bar
- we pass it 1
foo =
bar 1
baz :]
due to the paragraph reflow/wrapping function.
Also, this function only works the first time you use it on a doc: if you `edit` a doc and mess with it, you won't get the wrapping refreshed the next time you view. That's because the pretty-printing works by inserting newlines, which are treated as paragraph breaks by Unison the next time it sees the code.
I'm planning to fix this by
- only doing paragraph reflow/wrapping for lines with zero indent (where zero is the left-most non-whitespace column of the doc)
- normalizing docs during parse, including removing newlines that are within a paragraph.
See unison-src/transcripts/doc-formatting.md in this commit for more details of how this shakes out. Not the .md.output because that's showing the current behavior without this change implemented.
Hopefully this is just a few more lines of code to implement, and then #936/#994 is good to merge.