# How to use

Obviously, this is supposed to work only for code blocks (`<pre><code>`) and not for inline code.

By default the plugin trims all leading and trailing whitespace of every code block. It also removes extra indents and trailing whitespace on every line.

The default settings can be overridden with the `setDefaults()` method like so:

    Prism.plugins.NormalizeWhitespace.setDefaults({
    	'remove-trailing': true,
    	'remove-indent': true,
    	'left-trim': true,
    	'right-trim': true,
    	/*'break-lines': 80,
    	'indent': 2,
    	'remove-initial-line-feed': false,
    	'tabs-to-spaces': 4,
    	'spaces-to-tabs': 4*/
    });

The following settings are available:

remove-trailing
  Removes trailing whitespace on all lines.
remove-indent
  If the whole code block is indented too much it removes the extra indent.
left-trim
  Removes all whitespace from the top of the code block.
right-trim
  Removes all whitespace from the bottom of the code block.
break-lines
  Simple way of breaking long lines at a certain length (default is 80 characters).
indent
  Adds a certain number of tabs to every line.
remove-initial-line-feed
  Less aggressive version of left-trim. It only removes a single line feed from the top of the code block.
tabs-to-spaces
  Converts all tabs to a certain number of spaces (default is 4 spaces).
spaces-to-tabs
  Converts a certain number of spaces to a tab (default is 4 spaces).

# Examples

The following example demonstrates the use of this plugin:

The result looks like this:

    		var example = {
    			foo: true,

    			bar: false
    		};

It is also compatible with the keep-markup plugin:

    	@media screen {
    		div {
    			text-decoration: underline;
    			background: url('foo.png');
    		}
    	}