Commit Graph

24 Commits

Author SHA1 Message Date
Paul Chiusano
0a5c9bb648 All tests and transcripts passing 2020-11-19 14:05:07 -05:00
Chris Gibbs
b3a4f497f0 Another fix to doc literal whitespace handling
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.
2020-04-13 17:27:58 +01:00
Chris Gibbs
8dfc25e68d Merge branch 'master' into topic/1363-doc-space-glitch 2020-04-13 16:07:21 +01:00
Arya Irani
81b6679bf3 update transcripts 2020-04-08 14:25:19 -04:00
Chris Gibbs
991e266267 Part of a fix for #1363 - preservation of spaces after @ directives in first line when unindenting
Still need to dig into impact on docs.output.md.
2020-03-16 23:06:17 +00:00
Runar Bjarnason
64848d5d4e Don't show the name of the term 2020-03-06 10:59:13 -05:00
Runar Bjarnason
ea9684efaf Fixed argument order and transcripts 2020-02-07 15:17:43 -05:00
Mitchell Rosen
38fdcd01a1 Use namespace diff in link output 2020-01-20 14:36:09 -05:00
Chris Gibbs
22ebf28e8a #936 pretty-print doc literals - improve commenting 2020-01-16 22:54:52 +00:00
Chris Gibbs
22802b90cb #936 pretty-print doc literals - last tests and fixes 2020-01-16 21:55:41 +00:00
Chris Gibbs
e0d49eac06 #936 pretty-print doc literals - draft of parse-time doc normalization - needs debugging 2019-12-21 22:07:11 +00:00
Chris Gibbs
81ce53a4af #936 pretty-print doc literals - paragraphyText now uses wrapPreserveSpaces 2019-12-19 00:08:47 +00:00
Chris Gibbs
776af61064 #936 pretty-print doc literals - spec out modified paragraph reflow/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.
2019-12-16 23:32:36 +00:00
Chris Gibbs
8f284d902c #936 pretty-print doc literals - unbuggify doc unindenting 2019-12-15 15:25:29 +00:00
Chris Gibbs
6be8932b38 #936 pretty-print doc literals - unindent docs after parsing - unfinished
Causes some bogus changes to docs.output.md which I need to debug.
2019-12-14 18:15:32 +00:00
Chris Gibbs
8ee3ea30f8 \:] to escape :] in doc literals 2019-11-30 15:58:31 +00:00
Chris Gibbs
02f3048752 #936 pretty-print doc literals - merge through suffixy names 2019-11-24 22:16:51 +00:00
Chris Gibbs
a4c6dde06a Merge branch 'master' into topic/docs-936-pretty-literals 2019-11-24 22:05:17 +00:00
Chris Gibbs
408f4ca393 #936 pretty-print doc literals - done, with some snags remaining 2019-11-24 22:04:20 +00:00
Paul Chiusano
9a0350a669 Address PR comments 2019-11-19 11:28:23 -05:00
Paul Chiusano
00d0fc8c56 type based search uses suffixed input + regenerated transcripts 2019-11-13 13:57:51 -08:00
Paul Chiusano
d296266602 simplify paragraphyText, it's now much better behaved 2019-11-04 21:15:13 -05:00
Paul Chiusano
d28e532aa6 update docs example 2019-11-04 18:18:36 -05:00
Paul Chiusano
d3ab6ae190 Added a documentation transcript 2019-11-04 18:00:25 -05:00