I've added a new comment printing algorithm on the 'experimental' branch. By default, it uses the existing algorithm. The --comfmtflags option can be used to enable the new algorithm.
The goals of the new algorithm are to preserve the existing formatting already present within the comment itself while honoring line length limitations. The new algorithm does not try to be overly smart; however, it is capable of performing line breaks on word boundaries (when that flag is enabled). I'm looking for some feedback and/or suggestions on how to improve it. With the --comfmtflags command line option, there are three flag values that may be combined (from the comments in the comformat.c file): COMMENT_PRINT_LEGACY (1): Forces use of the legacy comment printing algorithm. For backward compatibility, this is the default. COMMENT_PRINT_TRIM_SPACE (2): Trims leading and trailing spaces where they do not materially impact formatting (i.e. at the start of the comment string -AND- right before each line indentation). This flag does not apply to the legacy comment printing algorithm. COMMENT_PRINT_WORD_BREAK (4): Attempts to break lines on word boundaries while honoring the logical line length. If this flag is not specified, honoring the logical line length may result in breaking lines in the middle of words. This flag does not apply to the legacy comment printing algorithm. -- Joe Mistachkin _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users