Revision: 8780753f80a6 Branch: default Author: Michael Whapples Date: Tue May 20 09:26:44 2014 UTCLog: Do not strip trailing whitespace if there is only space characters.
http://code.google.com/p/liblouisutdml/source/detail?r=8780753f80a6 Modified: /liblouisutdml/transcriber.c ======================================= --- /liblouisutdml/transcriber.c Fri May 16 20:08:50 2014 UTC +++ /liblouisutdml/transcriber.c Tue May 20 09:26:44 2014 UTC @@ -1081,7 +1081,13 @@ { int length = strlen ((char *) node->content); int k; - for (k = length; k > 0 && node->content[k - 1] <= 32; k--); + int stripSpace = 0; + for (k = length; k > 0 && node->content[k - 1] <= 32; k--) + // We want to track if the node only contains space 0x20 characters + if (node->content[k - 1] != 32) + stripSpace = 1; + if (stripSpace == 0) + k = length; // We want to keep the spaces if (k <= 0) return; if (k < length) For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com