Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

links with spaces after schema are parsed and should not #116

Description

@Simon-Laux

message parser version: ^0.14.1

input:

I want to set this dns record for example.chat: 
google-site-verification=bn78

Expected behavior:

[
    {
        "t": "Text",
        "c": "I want to set this dns record for "
    },
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "example.chat",
                "hostname": "example.chat",
            }
        }
    },
    {
        "t": "Text",
        "c": ": "
    },
    {
        "t": "Linebreak"
    },
    {
        "t": "Text",
        "c": "google-site-verification=bn78"
    }
]

Actual behavior:

[
    {
        "t": "Text",
        "c": "I want to set this dns record for example"
    },
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": ".chat",
                "hostname": ".chat: \ngoogle-site-verification=bn7",
                "punycode": {
                    "original_hostname": ".chat: \ngoogle-site-verification=bn7",
                    "ascii_hostname": ".xn--chat: \ngoogle-site-verification=bn7-",
                    "punycode_encoded_url": ".chat"
                }
            }
        }
    },
    {
        "t": "Text",
        "c": ": "
    },
    {
        "t": "Linebreak"
    },
    {
        "t": "Text",
        "c": "google-site-verification=bn78"
    }
]

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions