Skip to content

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

@Simon-Laux

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"
    }
]

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