fn parse_number(
    iter: &mut Peekable<Cloned<Iter<'_, u8>>>
) -> Result<CSSFloat, ()>
Expand description

This is a special version which parses the number for SVG Path. e.g. “M 0.6.5” should be parsed as MoveTo with a coordinate of (“0.6”, “.5”), instead of treating 0.6.5 as a non-valid floating point number. In other words, the logic here is similar with that of tokenizer::consume_numeric, which also consumes the number as many as possible, but here the input is a Peekable and we only accept an integer of a floating point number.

The “number” syntax in https://www.w3.org/TR/SVG/paths.html#PathDataBNF