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.
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.