Skip to content

Commit 45fbc9d

Browse files
replace GrommetMarkdown component with markdown-to-jsx v7.1.8 to fix markdown styling issue in firefox
1 parent 0d78ed5 commit 45fbc9d

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"grommet-icons": "^4.11.0",
4444
"grommet-theme-hpe": "2.0.2",
4545
"jest-styled-components": "^7.2.0",
46+
"markdown-to-jsx": "7.1.8",
4647
"netlify-cms-app": "^2.15.72",
4748
"netlify-cms-media-library-cloudinary": "^1.3.10",
4849
"prismjs": "^1.29.0",

src/components/Header/UserMenu.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { LinkNext } from 'grommet-icons';
44
import PropTypes from 'prop-types';
55
import { ButtonLink } from '..';
66

7-
// const { GATSBY_HPE_SIGNOUT } = process.env;
8-
// const { GATSBY_REDIRECT_URI } = process.env;
97

108
function getInitials(name) {
119
if (!name) {

src/components/Header/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ import { ButtonLink } from '..';
1717
import { UserMenu } from './UserMenu';
1818

1919

20-
// const { GATSBY_CLIENT_ID } = process.env;
21-
// const { GATSBY_CLIENT_OAUTH } = process.env;
22-
2320
const TextAlignLeft = styled(Box)`
2421
& > a {
2522
text-align: left;

src/components/Markdown/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import {
77
Button,
88
Heading,
99
Image as GrommetImage,
10-
Markdown as GrommetMarkdown,
1110
Paragraph,
1211
} from 'grommet';
1312
import { Download, Github } from 'grommet-icons';
1413
import PropTypes from 'prop-types';
1514
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
1615
import { deepMerge } from 'grommet/utils';
1716
import codestyle from './markdownTheme';
17+
import MarkdownToJSX from 'markdown-to-jsx';
1818

1919
class Image extends React.Component {
2020
render() {
@@ -158,13 +158,13 @@ export const titleComponents = deepMerge(cardComponents, {
158158
});
159159

160160
export const Markdown = (props) => (
161-
<GrommetMarkdown components={components} {...props} />
161+
<MarkdownToJSX components={components} {...props} />
162162
);
163163
export const CardMarkdown = (props) => (
164-
<GrommetMarkdown components={cardComponents} {...props} />
164+
<MarkdownToJSX components={cardComponents} {...props} />
165165
);
166166
export const TitleMarkdown = (props) => (
167-
<GrommetMarkdown components={titleComponents} {...props} />
167+
<MarkdownToJSX components={titleComponents} {...props} />
168168
);
169169

170170
export default Markdown;

yarn.lock

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9686,10 +9686,15 @@ markdown-table@^2.0.0:
96869686
dependencies:
96879687
repeat-string "^1.0.0"
96889688

9689+
9690+
version "7.1.8"
9691+
resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-7.1.8.tgz#49c3bb3c122aa714324034142c8829b93c889338"
9692+
integrity sha512-rRSa1aFmFnpDRFAhv5vIkWM4nPaoB9vnzIjuIKa1wGupfn2hdCNeaQHKpu4/muoc8n8J7yowjTP2oncA4/Rbgg==
9693+
96899694
markdown-to-jsx@^7.2.0:
9690-
version "7.4.0"
9691-
resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-7.4.0.tgz#4606c5c549a6f6cb87604c35f5ee4f42959ffb6b"
9692-
integrity sha512-zilc+MIkVVXPyTb4iIUTIz9yyqfcWjszGXnwF9K/aiBWcHXFcmdEMTkG01/oQhwSCH7SY1BnG6+ev5BzWmbPrg==
9695+
version "7.4.1"
9696+
resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-7.4.1.tgz#1ed6a60f8f9cd944bec39d9923fbbc8d3d60dcb9"
9697+
integrity sha512-GbrbkTnHp9u6+HqbPRFJbObi369AgJNXi/sGqq5HRsoZW063xR1XDCaConqq+whfEIAlzB1YPnOgsPc7B7bc/A==
96939698

96949699
material-colors@^1.2.1:
96959700
version "1.2.6"

0 commit comments

Comments
 (0)