[squeak-dev] Interesting formatting problem on SeasideDoc

gettimothy gettimothy at zoho.com
Sun Nov 18 07:31:21 UTC 2018


Good morning. Go here: http://menmachinesmaterials.com/SeasideDoc on left menu, click on HelpTopics. Select 'Terse Guide' for didactic purposes, scroll down to "Assignment"  Notice how the explanatory quoted text is right up next to the example. For example, in my texinfo page x := 1.2 hash looks like this output 1. x := 1.2 hash.                                              "hash value for object" while on the webpage it looks like this: output 2. x := 1.2 hash."hash value for object" The reason is that within the TerseGiudeHelp > pages > assignment you can see that tabs and spaces are co mingled and the formatting is not aligned. So, to remove that "bad" formatting, I used the following code: html paragraph       with:[               html preformatted               style:'white-space:pre-wrap; word-break: break-word;';               with: (ht contents  copyWithRegex:' '  matchesReplacedWith:' '  withBlanksCondensed  )]]] where 'ht contents' is the data stored in TerseGuideHelp > pages > assignment method. What I would like to do is re-insert some space between the example and the quoted text explanations so that output 2 looks like output 1. Maybe there is a way to do this cleanly within the String formatting methods? I am messing around with Regex like so (using Date examples here)... 'y := Date nameOfDay: 1."weekday name (#Monday,...)"' copyWithRegex: '("([^"]|"")*")' matchesReplacedWith:'                        "the original string shifted over like this"' The problem is replacing "the original string shifted over like this" with the contents of the original quotes string of "weekday name (#Monday, ...)' Any suggestions greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20181118/c52fdd12/attachment.html>


More information about the Squeak-dev mailing list