BUG: string wrapping (eg, argList help) truncates character (#2625)

- had an off-by-one in the accounting for some corner caes,
  partly because the logic was a bit convoluted

ENH: improved string wrapping (#2625)

- reworked logic (like a state machine) to handle backtracking
  with fallback of splitting near punctuation characters.

  Still doesn't compete with nroff or TeX, but does avoid long lines
  and many funny splits.  With this change the help for mapFieldsPar
  now like this:

  =====
      Specify the mapping method
      (direct|mapNearest|cellVolumeWeight|
      correctedCellVolumeWeight)
  =====

  Since the list of options is very long without any spaces, it takes
  '|' as the best split point, which definitely reads better
This commit is contained in:
Mark Olesen
2022-11-18 20:15:54 +01:00
parent d9ab5d54ef
commit d7bf2d400d
4 changed files with 238 additions and 58 deletions

View File

@ -0,0 +1,2 @@
/* EXE_INC = */
/* EXE_LIBS = */