public
Description: Beautifies your HTML erb templates. Imported from svn upstream; additional fixes to parse broken code properly.
Homepage: http://po-ru.com/diary/normalising-and-beautifying-rails-templates/
Clone URL: git://github.com/hosh/htmlbeautifier.git
name age message
file History.txt Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
file License.txt Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
file Manifest.txt Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
file README.txt Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
file Rakefile Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
directory bin/ Wed Nov 19 14:46:46 -0800 2008 [PATCH] Wrapped foreign_block into a begin resc... [hosh]
directory config/ Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
directory lib/ Wed Nov 19 14:46:46 -0800 2008 [PATCH] Wrapped foreign_block into a begin resc... [hosh]
directory script/ Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
file setup.rb Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
directory tasks/ Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
directory test/ Mon Sep 03 04:54:35 -0700 2007 Applied Dr Nic's patch to integrate with rubyge... [pbattley]
README.txt
= HTML Beautifier

A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.

== What it does

* Normalises hard tabs to spaces
* Removes trailing spaces
* Indents after opening HTML elements
* Outdents before closing elements
* Collapses multiple whitespace
* Indents after block-opening embedded Ruby (if, do etc.)
* Outdents before closing Ruby blocks
* Outdents elsif and then indents again
* Indents the left-hand margin of JavaScript and CSS blocks to match the indentation level of the code