# HG changeset patch # User Ben Schmidt # Date 1331527580 -39600 # Node ID e5b80f7085a19ab0b23c69f976091a0da0b92e31 # Parent 331115b58da4242a12d73b28470e943ee87bedb6 Add %nowrap% to facilitate more complex formatting. diff -r 331115b58da4 -r e5b80f7085a1 ChangeLog --- a/ChangeLog Sun Mar 11 23:09:58 2012 +1100 +++ b/ChangeLog Mon Mar 12 15:46:20 2012 +1100 @@ -1,3 +1,4 @@ + o Add %nowrap% to facilitate more complex formatting o Add subscription ability to php-admin o Add ability to except characters from width reckoning (and be zero-width) to facilitate wrapping even more languages well diff -r 331115b58da4 -r e5b80f7085a1 README.listtexts --- a/README.listtexts Sun Mar 11 23:09:58 2012 +1100 +++ b/README.listtexts Mon Mar 12 15:46:20 2012 +1100 @@ -251,12 +251,20 @@ - %wrap% - %wrap W% - concatenate and rewrap lines until the next empty or whitespace-only line to - a width of W (or 76 if W is omitted); second and later lines are preceded - with as many spaces as the width preceding the directive; the width is - reckoned including any text preceding the directive and any indentation - preserved from a file which included the current one, so it is an absolute - maximum width + concatenate and rewrap lines until the next empty line, whitespace-only line, + or %nowrap% directive to a width of W (or 76 if W is omitted); second and + later lines are preceded with as many spaces as the width preceding the + directive; the width is reckoned including any text preceding the directive + and any indentation preserved from a file which included the current one, so + it is an absolute maximum width + +To turn off wrapping before the end of a paragraph, use: + +- %nowrap% + stop wrapping; usually placed at the end of a line so the following line + break is honoured but all preceding text is properly wrapped; if you want + wrapping to continue after the break, you need to use %wrap% to turn it on + again on the following line To cater for various languages, there are a number of different wrapping modes that can be set. These can be set either before or after wrapping is specified, diff -r 331115b58da4 -r e5b80f7085a1 src/prepstdreply.c --- a/src/prepstdreply.c Sun Mar 11 23:09:58 2012 +1100 +++ b/src/prepstdreply.c Mon Mar 12 15:46:20 2012 +1100 @@ -969,6 +969,13 @@ *line_p = line; return 0; } + } else if(strcmp(token, "nowrap") == 0) { + txt->wrapwidth = 0; + line = concatstr(2, line, endpos + 1); + *pos_p = line + (*pos_p - *line_p); + myfree(*line_p); + *line_p = line; + return 0; } else if(strcmp(token, "ww") == 0 || strcmp(token, "wordwrap") == 0 || strcmp(token, "cw") == 0 ||