Skip to content

Wrong result when parsing string containing the : char #17

@marcotisi

Description

@marcotisi

Description

The library fails to parse a string when one or more address contains the : char.

Example

Parsing the string

John Doe :: Doe Industries <[email protected]>, Jane Doe :: Doe Industries <[email protected]>, [email protected]

returns this object:

[
  {
    "group": [
      {
        "group": [
          {
            "address": "[email protected]",
            "name": "Doe Industries"
          },
          {
            "group": [
              {
                "group": [
                  {
                    "address": "[email protected]",
                    "name": "Doe Industries"
                  },
                  {
                    "address": "[email protected]",
                    "name": ""
                  }
                ]
              }
            ],
            "name": "Jane Doe"
          }
        ]
      }
    ],
    "name": "John Doe"
  }
]

when it should be

[
  {
    "address": "[email protected]",
    "name": "John Doe :: Doe Industries"
  },
  {
    "address": "[email protected]",
    "name": "Jane Doe :: Doe Industries"
  },
  {
    "address": "[email protected]",
    "name": ""
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions