<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Ruby/html trick: wrap long strings with invisible wordwrap characters</title>
	<atom:link href="http://yanpritzker.com/2008/05/13/rubyhtml-trick-wrap-long-strings-with-invisible-wordwrap-characters/feed/" rel="self" type="application/rss+xml" />
	<link>http://yanpritzker.com/2008/05/13/rubyhtml-trick-wrap-long-strings-with-invisible-wordwrap-characters/</link>
	<description>photographer, entrepreneur, software engineer, musician, skier</description>
	<lastBuildDate>Mon, 14 May 2012 16:09:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Michele</title>
		<link>http://yanpritzker.com/2008/05/13/rubyhtml-trick-wrap-long-strings-with-invisible-wordwrap-characters/comment-page-1/#comment-11736</link>
		<dc:creator>Michele</dc:creator>
		<pubDate>Wed, 21 May 2008 21:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://skwpspace.com/2008/05/13/rubyhtml-trick-wrap-long-strings-with-invisible-wordwrap-characters/#comment-11736</guid>
		<description>I agree, it&#039;s definitely slower, but well worth it if you have to deal with text containing tags.</description>
		<content:encoded><![CDATA[<p>I agree, it&#8217;s definitely slower, but well worth it if you have to deal with text containing tags.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yan</title>
		<link>http://yanpritzker.com/2008/05/13/rubyhtml-trick-wrap-long-strings-with-invisible-wordwrap-characters/comment-page-1/#comment-11735</link>
		<dc:creator>yan</dc:creator>
		<pubDate>Wed, 21 May 2008 21:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://skwpspace.com/2008/05/13/rubyhtml-trick-wrap-long-strings-with-invisible-wordwrap-characters/#comment-11735</guid>
		<description>Thanks for the heads up, I also realized there was a bug in my code that would swallow spaces in the string. I fixed the regex not to do that. The link you showed, I found that after I wrote my post. In my case, I actually didn&#039;t care as much about breaking tags because I had only pure strings without tags to deal with. Probably the other implementation is more complete but also, I would guess, slightly slower. Thanks for the link though!</description>
		<content:encoded><![CDATA[<p>Thanks for the heads up, I also realized there was a bug in my code that would swallow spaces in the string. I fixed the regex not to do that. The link you showed, I found that after I wrote my post. In my case, I actually didn&#8217;t care as much about breaking tags because I had only pure strings without tags to deal with. Probably the other implementation is more complete but also, I would guess, slightly slower. Thanks for the link though!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michele</title>
		<link>http://yanpritzker.com/2008/05/13/rubyhtml-trick-wrap-long-strings-with-invisible-wordwrap-characters/comment-page-1/#comment-11734</link>
		<dc:creator>Michele</dc:creator>
		<pubDate>Wed, 21 May 2008 21:10:13 +0000</pubDate>
		<guid isPermaLink="false">http://skwpspace.com/2008/05/13/rubyhtml-trick-wrap-long-strings-with-invisible-wordwrap-characters/#comment-11734</guid>
		<description>Hi Yan,

I stumbled upon this post while looking for a good way to do word wrapping.

Your method looks good, except it could break words inside tags. You might want to check &lt;a href=&quot;http://henrik.nyh.se/2007/03/ruby-wordwrap-method&quot; rel=&quot;nofollow&quot;&gt;this one&lt;/a&gt; out instead: it makes sure not to break words inside  and in pre blocks.

I&#039;d thought about tokenizing and making sure to wrap only words between tags, but in the end it was too much overhead for such a simple task, and I guess the above is good enough (actually, it&#039;s perfect if  are correctly escaped when not used to surround tags).

I hope this helps. :)</description>
		<content:encoded><![CDATA[<p>Hi Yan,</p>
<p>I stumbled upon this post while looking for a good way to do word wrapping.</p>
<p>Your method looks good, except it could break words inside tags. You might want to check <a href="http://henrik.nyh.se/2007/03/ruby-wordwrap-method" rel="nofollow">this one</a> out instead: it makes sure not to break words inside  and in pre blocks.</p>
<p>I&#8217;d thought about tokenizing and making sure to wrap only words between tags, but in the end it was too much overhead for such a simple task, and I guess the above is good enough (actually, it&#8217;s perfect if  are correctly escaped when not used to surround tags).</p>
<p>I hope this helps. :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

