mapbox/geojson.io — pull request #95 by jieter (2013-08-08 19:17:53+00:00)
Title: Detect GeoJSON indentation style

While importing geojson, look in rows 1-10 for tabs or an arbitrary number of spaces and use that char/number while exporting.

Not sure if you would store the indentation style in a global var like this. Detection might be simplified by just looking at row 2&3, or even only at row 2, which will make it a single regexp. Sounds even better.

Tell me what you think...

Fixes #66