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

Twitter link throws Invalid list item link error #95

Closed
rajasegar opened this issue Mar 7, 2020 · 5 comments · Fixed by #129
Closed

Twitter link throws Invalid list item link error #95

rajasegar opened this issue Mar 7, 2020 · 5 comments · Fixed by #129

Comments

@rajasegar
Copy link

rajasegar commented Mar 7, 2020

I am getting error on this link though it's a valid one

https://twitter.com/_lizzelo_

with error message:

 Invalid list item link  remark-lint:awesome-list-item
@sindresorhus
Copy link
Owner

Can you share the complete line, not just the link?

@rajasegar
Copy link
Author

- [Elisabeth Engel (@_lizzelo_)](https://twitter.com/_lizzelo_)

@rajasegar
Copy link
Author

The repo is here
https://github.com/rajasegar/awesome-micro-frontends
README.md Line 150

@sindresorhus
Copy link
Owner

It fails somewhere here:

function validateListItemLink(link, file) {
if (link.type !== 'link') {
file.message('Invalid list item link', link);
return false;
}
if (!isUrl(link.url)) {
file.message('Invalid list item link URL', link);
return false;
}
const linkText = toString(link);
if (!linkText) {
file.message('Invalid list item link text', link);
return false;
}
for (const node of link.children) {
if (!listItemLinkNodeWhitelist.has(node.type)) {
file.message('Invalid list item link', node);
return false;
}
}
return true;
}
Not sure why.

@chinesedfan
Copy link
Contributor

Easy to find out the reason. See astexplorer and #129 will fix it.

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

Successfully merging a pull request may close this issue.

3 participants