Skip to content

Commit

Permalink
Fix/indenting for addon-notes & addon-info on markdown code blocks (#…
Browse files Browse the repository at this point in the history
…7158)

Fix/indenting for addon-notes & addon-info on markdown code blocks
  • Loading branch information
shilman committed Jul 31, 2019
1 parent 2046e90 commit f62f124
Show file tree
Hide file tree
Showing 5 changed files with 2,442 additions and 788 deletions.
2 changes: 1 addition & 1 deletion addons/info/src/components/markdown/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { SyntaxHighlighter } from '@storybook/components';

const Code = ({ language, code }) => (
<SyntaxHighlighter bordered copyable language={language}>
<SyntaxHighlighter format={false} bordered copyable language={language}>
{code}
</SyntaxHighlighter>
);
Expand Down
8 changes: 7 additions & 1 deletion addons/notes/src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ export const SyntaxHighlighter = ({ className, children, ...props }: SyntaxHighl
// className: "lang-jsx"
const language = className.split('-');
return (
<SyntaxHighlighterBase language={language[1] || 'plaintext'} bordered copyable {...props}>
<SyntaxHighlighterBase
language={language[1] || 'plaintext'}
bordered
format={false}
copyable
{...props}
>
{children}
</SyntaxHighlighterBase>
);
Expand Down
Loading

0 comments on commit f62f124

Please sign in to comment.