<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: whitespace</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/whitespace.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2008-07-01T14:50:43+00:00</updated><author><name>Simon Willison</name></author><entry><title>Whitespace Sensitivity</title><link href="https://simonwillison.net/2008/Jul/1/lucumr/#atom-tag" rel="alternate"/><published>2008-07-01T14:50:43+00:00</published><updated>2008-07-01T14:50:43+00:00</updated><id>https://simonwillison.net/2008/Jul/1/lucumr/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://lucumr.pocoo.org/cogitations/2008/07/01/whitespace-sensitivity/"&gt;Whitespace Sensitivity&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Amusingly, Ruby is actually far more sensitive about whitespace than Python is.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/armin-ronacher"&gt;armin-ronacher&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ruby"&gt;ruby&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/whitespace"&gt;whitespace&lt;/a&gt;&lt;/p&gt;



</summary><category term="armin-ronacher"/><category term="python"/><category term="ruby"/><category term="whitespace"/></entry><entry><title>Faster JavaScript Trim</title><link href="https://simonwillison.net/2008/Feb/3/faster/#atom-tag" rel="alternate"/><published>2008-02-03T22:12:25+00:00</published><updated>2008-02-03T22:12:25+00:00</updated><id>https://simonwillison.net/2008/Feb/3/faster/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.stevenlevithan.com/archives/faster-trim-javascript"&gt;Faster JavaScript Trim&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Neat optimisation post—it turns out that while regular expressions are great for removing leading whitespace you can do a lot better at trailing whitespace by manually looping backwards from the end of the string.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/optimisation"&gt;optimisation&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/steven-levithan"&gt;steven-levithan&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/trim"&gt;trim&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/whitespace"&gt;whitespace&lt;/a&gt;&lt;/p&gt;



</summary><category term="javascript"/><category term="optimisation"/><category term="steven-levithan"/><category term="trim"/><category term="whitespace"/></entry></feed>