Interesting formatting problem on SeasideDoc

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Interesting formatting problem on SeasideDoc

Squeak - Dev mailing list

Good morning.

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
              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.