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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using override to set title property for a Link-component doesn't work #238

Closed
kiltec opened this issue Feb 28, 2019 · 1 comment 路 Fixed by #237
Closed

Using override to set title property for a Link-component doesn't work #238

kiltec opened this issue Feb 28, 2019 · 1 comment 路 Fixed by #237

Comments

@kiltec
Copy link

kiltec commented Feb 28, 2019

Hi!

First off, thanks for you parser, it's very useful for us! 馃憤

Unfortunately, we stumpled upon the following bug:

Given you use the following override:

const titleOverride = {
	a: {component: Link, props: {isInline: true, title: 'some cool link'}}
};

and the markdown to be parsed is
This sentence contains a [link](https://example.org).
when you compile that markdown, then the anchor-tag gets correctly replaced with the Link-component but the value passed to the title property of Link is always undefined.

It seems to be caused by an incorrect order of spreading the properties, see: #237

We're going to add tests to that PR and add a comment to this issue once we think we're done.

@kiltec
Copy link
Author

kiltec commented Feb 28, 2019

We've added the test to the PR.

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

Successfully merging a pull request may close this issue.

1 participant