Q:

Commas in SVG path descriptions

When describing paths in SVG, online examples often separate values with commas, while others don't.
The paths tutorial from the Mozilla Developer Network SVG Tutorial uses both notations to describe arcs:
A 30 50 0 0 1 162.55 162.45

and
A 45 45, 0, 0, 0, 125 125

Elsewhere, I have also seen:
A30,50 0 0,1 100,100

When and where do SVG path descriptions need commas?

A:

Commas are mostly optional and whitespace is also mostly optional. You need one or the other in some cases to say when something ends and the next thing begins i.e. so that 1,1 or 1 1 is not parsed as 11.
You can put a single comma between any two numbers so A, 30 50 0 0 1 162.55 162.45 is invalid as is A 30,, 50 0 0 1 162.55 162.45

A:

The W3C SVG Recommendation states that:

Superfluous white space and separators such as commas can be eliminated (e.g., "M 100 100 L 200 200" contains unnecessary spaces and could be expressed more compactly as "M100 100L200 200").

