Yes, that is the idea- all the inner content or descendant nodes will now have implicit spacing- adding a &#39;&gt;&#39; to get the &quot;huge win&quot; scenario from the examples given. I do think it adds confusion for new users- it isn&#39;t something we would want to use in a tutorial. It would be a feature for users already comfortable with Hamlet. Perhaps &#39;&lt;p&gt;&gt;&#39; is actually too subtle. Some alternatives:<div>

<br></div><div>&lt;p&gt;spaced&gt;</div><div>&lt;p&gt;S&gt;</div><div>&lt;p&gt;#&gt;</div><div>&lt;p&gt;&lt; &gt;<div><br></div><div>There is also a possibility of adding an indicator inside the tag.</div><div>&lt;p=&gt;</div>

<div>&lt;p=spaced&gt;</div><div>&lt;p=#&gt;<br><div><br> <br><div class="gmail_quote">On Mon, May 23, 2011 at 11:22 PM, Mark Bradley <span dir="ltr">&lt;<a href="mailto:barkmadley@gmail.com">barkmadley@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Tue, May 24, 2011 at 4:13 PM, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; wrote:<br>


&gt; On Tue, May 24, 2011 at 7:00 AM, Greg Weber &lt;<a href="mailto:greg@gregweber.info">greg@gregweber.info</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; The Yesod homepage looks like this:<br>
&gt;&gt;         &lt;p&gt;<br>
&gt;&gt;             If you are new to Yesod, you should start off with #<br>
&gt;&gt;             &lt;a href=@{FiveMinutesR}&gt;the five minute start instructions<br>
&gt;&gt;             . The #<br>
&gt;&gt;             &lt;a href=@{ScreencastsR}&gt;screencasts<br>
&gt;&gt;             \ give a nice introduction to some of the advanced concepts, and<br>
&gt;&gt; #<br>
&gt;&gt;             &lt;a href=@{BookR}&gt;the book<br>
&gt;&gt;             \ is the recommended approach to learning Yesod. Ask the #<br>
&gt;&gt;             &lt;a href=@{CommunityR}&gt;commnunity<br>
&gt;&gt;             \ for help.<br>
&gt;&gt; Allowing one-line tags in positions other than the very beginning allows for<br>
&gt;&gt; the removal of the &#39;#&#39; character:<br>
&gt;&gt;         &lt;p&gt;<br>
&gt;&gt;             If you are new to Yesod, you should start off with<br>
&gt;&gt;             \ &lt;a href=@{FiveMinutesR}&gt;the five minute start instructions<br>
&gt;&gt;             . The &lt;a href=@{ScreencastsR}&gt;screencasts<br>
&gt;&gt;             \ give a nice introduction to some of the advanced concepts, and<br>
&gt;&gt;             \ &lt;a href=@{BookR}&gt;the book<br>
&gt;&gt;             \ is the recommended approach to learning Yesod. Ask the<br>
&gt;&gt;             \ &lt;a href=@{CommunityR}&gt;commnunity<br>
&gt;&gt;             \ for help.<br>
&gt;&gt; Having implicit spaces is actually a huge win here:<br>
&gt;&gt;         &lt;p&gt;<br>
&gt;&gt;             If you are new to Yesod, you should start off with<br>
&gt;&gt;             &lt;a href=@{FiveMinutesR}&gt;the five minute start instructions<br>
&gt;&gt;             The<br>
&gt;&gt;             &lt;a href=@{ScreencastsR}&gt;screencasts<br>
&gt;&gt;             give a nice introduction to some of the advanced concepts, and<br>
&gt;&gt;             &lt;a href=@{BookR}&gt;the book<br>
&gt;&gt;             is the recommended approach to learning Yesod. Ask the<br>
&gt;&gt;             &lt;a href=@{CommunityR}&gt;commnunity<br>
&gt;&gt;             for help.<br>
&gt;&gt; But I am wondering if it is best to keep things the way they are but just<br>
&gt;&gt; indicate when there should be implicit spaces. My thought is to somehow use<br>
&gt;&gt; angle brackets. Changing &lt;p&gt; to &lt;p&gt;&gt; would indicate implicit spaces.<br>
&gt;<br>
&gt; What&#39;s the advantage of adding a new syntax for &quot;implicit&quot; space<br>
&gt; versus just explicitly adding the space?<br>
<br>
</div></div>I think he means that the child nodes of &lt;p&gt;&gt; would be affected by<br>
some implicit spacing rules.<br>
<br>
Personally I prefer one consistent behaviour (explicit spacing every<br>
time).  Trying to get too smart will get confusing and inaccurate<br>
quickly.<br>
<div><div></div><div class="h5"><br>
&gt;<br>
&gt; Michael<br>
&gt;<br>
&gt;&gt; Greg Weber<br>
&gt;&gt; On Fri, May 20, 2011 at 8:22 AM, Patrick Brisbin &lt;<a href="mailto:pbrisbin@gmail.com">pbrisbin@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 05/20/11 at 11:12am, Daniel Patterson wrote:<br>
&gt;&gt;&gt; &gt; I think what the original author was saying was that when you make a new<br>
&gt;&gt;&gt; &gt; line with html, whitespace is inserted, not whether hamlet should<br>
&gt;&gt;&gt; &gt; automatically insert space after every tag.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; So yes, writing &lt;p&gt;hello&lt;strong&gt;there&lt;/strong&gt;&lt;/p&gt; should not put white<br>
&gt;&gt;&gt; &gt; spacing.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; But when you write, in html:<br>
&gt;&gt;&gt; &gt; &lt;p&gt;hello<br>
&gt;&gt;&gt; &gt;     &lt;strong&gt;there&lt;/strong&gt;&lt;/p&gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; It is equivalent to &lt;p&gt;hello &lt;strong&gt;there&lt;/strong&gt;&lt;/p&gt; (note the<br>
&gt;&gt;&gt; &gt; space).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Isn&#39;t that simply due to the fact that HTML compresses whitespace across<br>
&gt;&gt;&gt; the board? (turning that &quot;\n\t&quot; or &quot;\n    &quot; into just &quot; &quot;)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Leading spaces in hamlet are used to define nesting, so also compressing<br>
&gt;&gt;&gt; this whitespace (rather than stripping it) would produce odd effects:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  &lt;div&gt;<br>
&gt;&gt;&gt;      &lt;p&gt;Hey<br>
&gt;&gt;&gt;          &lt;strong&gt;there<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Would turn into<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;  &lt;div&gt; &lt;p&gt;Hey &lt;strong&gt;there&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Which has an unneeded space after the parent &lt;div&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Right?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; On May 19, 2011, at 11:57 PM, Michael Snoyman wrote:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; On Thu, May 19, 2011 at 11:49 PM, Patrick Palka &lt;<a href="mailto:patrick@parcs.ath.cx">patrick@parcs.ath.cx</a>&gt;<br>
&gt;&gt;&gt; &gt; &gt; wrote:<br>
&gt;&gt;&gt; &gt; &gt;&gt; I find it a bit unintuitive that the hamlet code<br>
&gt;&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt; &gt;&gt; &lt;p&gt;hello<br>
&gt;&gt;&gt; &gt; &gt;&gt;    &lt;strong&gt;there<br>
&gt;&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt; &gt;&gt; or<br>
&gt;&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt; &gt;&gt; &lt;p&gt;<br>
&gt;&gt;&gt; &gt; &gt;&gt;     hello<br>
&gt;&gt;&gt; &gt; &gt;&gt;     &lt;strong&gt;there<br>
&gt;&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt; &gt;&gt; generates the html<br>
&gt;&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt; &gt;&gt; &lt;p&gt;hello&lt;strong&gt;there&lt;/strong&gt;&lt;/p&gt;<br>
&gt;&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt; &gt;&gt; I expected there to be a space between &quot;hello&quot; and &quot;there&quot; similar to<br>
&gt;&gt;&gt; &gt; &gt;&gt; what<br>
&gt;&gt;&gt; &gt; &gt;&gt; the html specifications dictate. Is this behavior intentional or an<br>
&gt;&gt;&gt; &gt; &gt;&gt; oversight? If it&#39;s the former, then what is the recommended way to<br>
&gt;&gt;&gt; &gt; &gt;&gt; simulate<br>
&gt;&gt;&gt; &gt; &gt;&gt; my expected behavior? Appending a space to the end of a line is<br>
&gt;&gt;&gt; &gt; &gt;&gt; mentally ugly and syntactically obscure.<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; I&#39;m not sure what you mean by &quot;what the html specifications dictate.&quot;<br>
&gt;&gt;&gt; &gt; &gt; HTML is whitespace-sensitive, meaning that:<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt;   &lt;i&gt;foo&lt;/i&gt; &lt;b&gt;bar&lt;/b&gt;<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; and<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt;    &lt;i&gt;foo&lt;/i&gt;&lt;b&gt;bar&lt;/b&gt;<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; Are different. Now, in all likelihood in the above example, you will<br>
&gt;&gt;&gt; &gt; &gt; want to have the whitespace surrounding tags. But consider the<br>
&gt;&gt;&gt; &gt; &gt; following HTML:<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt;    &lt;p&gt;You are logged in as &lt;i&gt;Michael Snoyman&lt;/i&gt;, &lt;a<br>
&gt;&gt;&gt; &gt; &gt; href=&quot;/logout&quot;&gt;logout&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Another paragraph.&lt;/p&gt;<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; In the case of the &lt;i&gt; and &lt;a&gt; tags, we definitely do *not* want to<br>
&gt;&gt;&gt; &gt; &gt; add whitespace after the tag (though we do want it before the tag). In<br>
&gt;&gt;&gt; &gt; &gt; the case of &lt;p&gt;, we don&#39;t care one way or another, but adding the<br>
&gt;&gt;&gt; &gt; &gt; whitespace everywhere will take up (a trivial amount of) extra<br>
&gt;&gt;&gt; &gt; &gt; bandwidth. tl;dr: Sometimes you don&#39;t want the whitespace.<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; So when designing Hamlet, I thought up a few possibilities:<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; 1) What we do now: all whitespace must be explicit.<br>
&gt;&gt;&gt; &gt; &gt; 2) Implicitly add whitespace before/after every tag.<br>
&gt;&gt;&gt; &gt; &gt; 3) Do something &quot;smart&quot;, adding whitespace where it&#39;s desired.<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; (2) isn&#39;t really an option because it makes having a tag as the last<br>
&gt;&gt;&gt; &gt; &gt; word in a sentence impossible. (3) gives me the creeps: I like smart<br>
&gt;&gt;&gt; &gt; &gt; libraries, but I will *never* trust a library to do this kind of stuff<br>
&gt;&gt;&gt; &gt; &gt; correctly all the time, even if I&#39;m the one making up the rules for it<br>
&gt;&gt;&gt; &gt; &gt; to follow! And I have no doubt that it will quickly devolve into 500<br>
&gt;&gt;&gt; &gt; &gt; lines of hairy code to try and cover millions of corner cases. Oh, and<br>
&gt;&gt;&gt; &gt; &gt; don&#39;t forget that there are other languages than English that might<br>
&gt;&gt;&gt; &gt; &gt; approach it differently.<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; I suppose another possibility is (2) along with some special way of<br>
&gt;&gt;&gt; &gt; &gt; forcing the removal of extra whitespace, but this seemed much less<br>
&gt;&gt;&gt; &gt; &gt; intuitive than the current approach.<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; Anyway, that&#39;s the reasoning behind this stuff, if people have better<br>
&gt;&gt;&gt; &gt; &gt; ideas, I&#39;d like to hear them.<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; Michael<br>
&gt;&gt;&gt; &gt; &gt;<br>
&gt;&gt;&gt; &gt; &gt; _______________________________________________<br>
&gt;&gt;&gt; &gt; &gt; web-devel mailing list<br>
&gt;&gt;&gt; &gt; &gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt;&gt;&gt; &gt; &gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt;&gt; &gt; web-devel mailing list<br>
&gt;&gt;&gt; &gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt;&gt;&gt; &gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; patrick brisbin<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; web-devel mailing list<br>
&gt;&gt;&gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt;&gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; web-devel mailing list<br>
&gt;&gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; web-devel mailing list<br>
&gt; <a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
&gt;<br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
-barkmadley<br>
sent from an internet enabled device<br>
</font></blockquote></div><br></div></div></div>