Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help to create Markdown Link Matcher #403

Closed
jsonpreet opened this issue May 11, 2023 · 0 comments
Closed

Help to create Markdown Link Matcher #403

jsonpreet opened this issue May 11, 2023 · 0 comments

Comments

@jsonpreet
Copy link

jsonpreet commented May 11, 2023

Hi,

I am trying to make a link matcher for the markdown url:

Ordinals good or bad for Bitcoin? Supporters and opposers raise voices

{
	pattern: /\[([^\[\]]*)\]\((.*?)\)/gm,
	style: { color: '#ff00ff' },
	getLinkText: (replacerArgs) => `${replacerArgs[1]}`,
	getLinkUrl: (replacerArgs) => `${replacerArgs[3]}`,
	onPress: (match) => {
		console.log(match.getReplacerArgs()[4])
		//router.push(`/user/${match.getReplacerArgs()[1]}`);
	}
},

When click on Link it returns following code:

(@ELEMENT-6a5e7f50c2-0@)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant