-
Notifications
You must be signed in to change notification settings - Fork 841
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
[EuiMarkdownEditor] Add a markdown link validator #4362
[EuiMarkdownEditor] Add a markdown link validator #4362
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_4362/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4362/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4362/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM. Don't forget a changelog entry
Preview documentation changes for this PR: https://eui.elastic.co/pr_4362/ |
Summary
Closes #4331
markdown parsing
https://eui.elastic.co/pr_4362/#/editors-syntax/markdown-editor
Look how only the valid urls get rendered as links, and the rest render their text. Ooooh. Ahhhh. Valid markdown links start with http:/https: or a forward slash.
href validation
https://eui.elastic.co/pr_4362/#/navigation/link#link-validation
EuiLink docs updated with a section on the validation. I [Chandler] initially planned on creating a new prop to disable the validation, but with React planning on similarly removing this functionality I'm going to be optimistic that no one will miss having this option available. In contrast to markdown's validation which only allows a small approved list of url patterns, the href validation only prevents
javascript:
.Components affected:
Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Checked in Chrome, Safari, Edge, and Firefox- [ ] Props have proper autodocs- [ ] Added documentation- [ ] Checked Code Sandbox works for the any docs examples- [ ] Checked for accessibility including keyboard-only and screenreader modes