Perhaps someone else can answer the query directly. However, you might want to consider an alternative approach.
Have you considered using a code reformatting tool, such as Artistic Style? If you run the tool automatically, based on a hook, it could be used to reformat the code consistently for leading whitespace and all sorts of other factors. I've used the tool but haven't automated its use.
I've heard of developers that automatically run the tool on checkout, with developer specific settings, to reformat code to a style that they prefer. On check-in the tool is re-run, with team settings, to reformat the code to team agreed standards.
I don't need this flexibility so I haven't tested it but it seems like a plausible solution. It might be something that you could consider investigating if you don't get a more direct solution.
Hope this helps.