Skip to content

Commit

Permalink
Merge branch 'master' into chunks-sort-mode-none
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi authored Apr 2, 2018
2 parents 31dd196 + 2675c19 commit f8fc80f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/notes/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import addons from '@storybook/addons';
import marked from 'marked';
import { WithNotes as ReactWithNotes } from './react';

export const withMarkdownNotes = text => {
export const withMarkdownNotes = (text, options) => {
const channel = addons.getChannel();

return getStory => context => {
marked.setOptions({ ...marked.defaults, options });
// send the notes to the channel before the story is rendered
channel.emit('storybook/notes/add_notes', marked(text));
return getStory(context);
Expand Down

0 comments on commit f8fc80f

Please sign in to comment.