Easy one...
When I copy and paste code from my Agile Rails PDF file, the indentation gets totally lost and looks like this:
=========================== <h1>Display Cart</h1> <table> <% for item in @items product = item.product -%> <tr> <td><%= item.quantity %></td> <td><%= h(product.title) %></td> <td align="right"><%= item.unit_price %></td> <td align="right"><%= item.unit_price * item.quantity %></td> </tr> <% end -%> </table> ===========================
Is there an easy way to indent my code? I tried using tidy but it likes to convert my special chars into HTML entities which ruins my Ruby code.
Any solution?
Sean
:::: DataFly.Net :::: Complete Web Services http://www.datafly.net
On 27/11/2005, at 1:52, Sean Schertell wrote:
When I copy and paste code from my Agile Rails PDF file, the indentation gets totally lost and looks like this: [...]
Is there an easy way to indent my code?
Try: Edit -> Select All and then Text -> Indent Selection.
I tried using tidy but it likes to convert my special chars into HTML entities which ruins my Ruby code.
The version in the HTML bundle shouldn't do that (since utf-8 is specified as encoding).
Ahhh, that's the stuff! Thanks :-)
On Nov 27, 2005, at 4:51 PM, Allan Odgaard wrote:
On 27/11/2005, at 1:52, Sean Schertell wrote:
When I copy and paste code from my Agile Rails PDF file, the indentation gets totally lost and looks like this: [...]
Is there an easy way to indent my code?
Try: Edit -> Select All and then Text -> Indent Selection.
I tried using tidy but it likes to convert my special chars into HTML entities which ruins my Ruby code.
The version in the HTML bundle shouldn't do that (since utf-8 is specified as encoding).
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
:::: DataFly.Net :::: Complete Web Services http://www.datafly.net