Gustav Eek [Sun, 5 Mar 2023 18:17:45 +0000 (19:17 +0100)]
Src. Add parsing and printing of numbered item lists.
Add a member *number* to *Conf* struct, which is a printing template
for the case of numbered list. In *winnow*, identify number patterns,
store it them as template in *conf* and remove it. In *output* print
according to pattern. Also provide some basic tests.
A special treatment is in printing is that number width is adopted to
the length for right alignment. A special treatment in parsing is that
the widest numbered list item should be used for pattern definition.
Only for that you can tell about leading and trailing spaces.
TODO Clean up (refactor) number pattern parsing in *winnow*.
TODO Write some useful instructions in *README* from above commit
message.
Gustav Eek [Sun, 26 Feb 2023 07:46:28 +0000 (08:46 +0100)]
Src. Handle bullet lists
Support for bullet list input is implemented with regular expressions
in *winnow*. The configuration struct stores bullet format if
found. Function *output* implements the printing. Testing is completed
for all above.
Gustav Eek [Sun, 26 Feb 2023 07:41:18 +0000 (08:41 +0100)]
Src. Refactor. Prepare for storing output modes.
A configuration struct is added for storing various output
modes. Function *winnow* returns this *config*. The *winnow* function
is changed to be called by value.
Gustav Eek [Sun, 19 Feb 2023 16:26:29 +0000 (17:26 +0100)]
Src. Split input function and provide tests
* Refactor a split of the *input* function into *winnow*
* Trim and remove empty items
* Provice two tests for input cleaning
* Clean up among *use* headers