Skip to content

fvsch/outdent-string

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

outdent.js

An experiment to detect and remove extraneous leading whitespace from multiline strings, especially for HTML code.

Only tested in latest Firefox, Safari and Chrome (in 2014). Fair warning: this was a personal experiment, might be unstable and have subpar performance.

Documentation

There isn’t much. See this article for an introduction, and look at the outdent.js file directly.

Running the demo page

The demo can be run using PHP’s built-in development server:

php --server localhost:8000

Then open http://localhost:8000/demo.php in your browser of choice.

About

Detect and remove extraneous leading whitespace from multiline strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published