<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Here is an example of an automatic formatting:<br>
<pre><tt>
1 renderCategoriesOn: html </tt></pre>
<pre><tt>2 html fieldSet legend: 'Choose one or more categories';</tt></pre>
<pre><tt>3 </tt></pre>
<pre><tt>4 with: [html</tt></pre>
<pre><tt>5 unorderedList: [self allCategories</tt></pre>
<pre><tt>6 do: [:category | html</tt></pre>
<pre><tt>7 listItem: [html checkbox</tt></pre>
<pre><tt>8 value: (self belongsToCategory: category);</tt></pre>
<pre><tt>9 </tt></pre>
<pre><tt>10 onTrue: [self addCategory: category]</tt></pre>
<pre><tt>11 onFalse: [self removeCategory: category];</tt></pre>
<pre><tt>12 </tt></pre>
<pre><tt>13 with: [html text: category asString]]]</tt></pre>
<pre><tt>14 separatedBy: [html break]]]
</tt></pre>
Here are my opinion:<br>
<br>
- use spaces instead of tabs (I don't know if this is wanted)<br>
- on line 2, #legend: can be put in the following line<br>
- the line 3 should not be empty<br>
- on line 4, #with: should be aligned with #legend:<br>
- the #do: on line 6 should be under (self allCategories) and not under
#unorderedList:<br>
- the same for #listItem: on line 7, and the three messages applied to
(html checkbox) on lines 8, 10-11, 13.<br>
- #separatedBy: should stay under the #do: if you move it (but it is ok
currently)<br>
<br>
These is just my taste. Others might have different opinions.<br>
<br>
Here is how I found have formatted it manually which is a bit different
from what you did + points before:<br>
<br>
<pre><tt>renderCategoriesOn: html </tt></pre>
<pre><tt> html fieldSet</tt></pre>
<pre><tt> legend: 'Choose one or more categories';</tt></pre>
<pre><tt> with: [html unorderedList: [</tt></pre>
<pre><tt> self allCategories</tt></pre>
<pre><tt> do: [:category |</tt></pre>
<pre><tt> html listItem: [</tt></pre>
<pre><tt> html checkbox</tt></pre>
<pre><tt> value: (self belongsToCategory: category);</tt></pre>
<pre><tt> onTrue: [self addCategory: category] onFalse: [self removeCategory: category];</tt></pre>
<pre><tt> with: [html text: category asString]]]</tt></pre>
<pre><tt> separatedBy: [html break]]]</tt></pre>
<br>
<br>
Hope it can helps you<br>
<br>
Bye<br>
</body>
</html>