Skip to content

Wrong result when parsing string containing the : char #17

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 <john@doe.com>, Jane Doe :: Doe Industries <jane@doe.com>, jim@doe.com

returns this object:

[
  {
    "group": [
      {
        "group": [
          {
            "address": "john@doe.com",
            "name": "Doe Industries"
          },
          {
            "group": [
              {
                "group": [
                  {
                    "address": "jane@doe.com",
                    "name": "Doe Industries"
                  },
                  {
                    "address": "jim@doe.com",
                    "name": ""
                  }
                ]
              }
            ],
            "name": "Jane Doe"
          }
        ]
      }
    ],
    "name": "John Doe"
  }
]

when it should be

[
  {
    "address": "john@doe.com",
    "name": "John Doe :: Doe Industries"
  },
  {
    "address": "jane@doe.com",
    "name": "Jane Doe :: Doe Industries"
  },
  {
    "address": "jim@doe.com",
    "name": ""
  }
]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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