Skip to content

Commit

Permalink
Lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall committed Apr 13, 2022
1 parent a58ede3 commit b63fca8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 8 additions & 4 deletions src-docs/src/views/markdown_editor/mardown_format_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,15 @@ export const MarkdownFormatExample = {
text: (
<>
<p>
Markdown content often comes from untrusted sources like user generated content. To help with potential security issues, <EuiCode>EuiMarkdownRenderer</EuiCode> only renders links if they begin with <EuiCode>https:</EuiCode>, <EuiCode>https</EuiCode>, or <EuiCode>/</EuiCode>. Links that do not meet these requirements are rendered in the markdown link format, with the exception of <EuiCode>mailto:</EuiCode> where only the link copy is kept.
Markdown content often comes from untrusted sources like user
generated content. To help with potential security issues,{' '}
<EuiCode>EuiMarkdownRenderer</EuiCode> only renders links if they
begin with <EuiCode>https:</EuiCode>, <EuiCode>https</EuiCode>, or{' '}
<EuiCode>/</EuiCode>. Links that do not meet these requirements are
rendered in the markdown link format, with the exception of{' '}
<EuiCode>mailto:</EuiCode> where only the link copy is kept.
</p>
<EuiCodeBlock language="markdown">
{markdownContent}
</EuiCodeBlock>
<EuiCodeBlock language="markdown">{markdownContent}</EuiCodeBlock>
</>
),
props: {
Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/markdown_editor/markdown_format_links.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ import React from 'react';

import { EuiMarkdownFormat } from '../../../../src';

// eslint-disable-next-line no-restricted-globals
const locationPathname = location.pathname;

export const markdownContent = `**Links starting with http:, https:, and / are valid:**
* https://elastic.com
* http://elastic.com
* https link to [elastic.co](https://elastic.co)
* http link to [elastic.co](http://elastic.co)
* relative link to [eui doc's homepage](${location.pathname})
* relative link to [eui doc's homepage](${locationPathname})
**Other link protocols are kept as their markdown source:**
* ftp://elastic.co
Expand Down

0 comments on commit b63fca8

Please sign in to comment.