Skip to content

truncate only in urls #66

@rerererarara

Description

@rerererarara

Hi,

I want to use truncate only in urls. When I use truncate, Custom Matchers are also affected. How can I disable truncate in Custom Matchers?

For example like this;

    <Autolink
        text={text}
        url
        truncate={32}
        matchers={[
            {
                pattern: /@\[([^[]*)]\(([^(^)]*)\)/g,
                truncate:{0},
                style: { color: '#ff00ff' },
                getLinkText: (replacerArgs) => `@${replacerArgs[1]}`,
                onPress: (match) => {
                    navigate('userProfile', { userId: match.getReplacerArgs()[2] });
                },
            },
        ]}
    />

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions