Skip to content

Commit

Permalink
Enable footnotes by default
Browse files Browse the repository at this point in the history
We're already doing the work to aggregate them, so might as well just
enable them by default to reduce cognitive load. It's a specific pattern
that won't trigger accidentally.
  • Loading branch information
Evan Jacobs committed Mar 21, 2016
1 parent 5cd7aa2 commit 8764bb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions __tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ describe('markdown-to-jsx', () => {
'foo[^abc] bar',
'',
'[^abc]: Baz baz',
].join('\n'), {footnotes: true}));
].join('\n')));

const elementNode = ReactDOM.findDOMNode(element);

Expand All @@ -546,7 +546,7 @@ describe('markdown-to-jsx', () => {
'foo[^abc] bar',
'',
'[^abc]: Baz baz',
].join('\n'), {footnotes: true}));
].join('\n')));

const elementNode = ReactDOM.findDOMNode(element);
const definitions = elementNode.children[1];
Expand All @@ -563,7 +563,7 @@ describe('markdown-to-jsx', () => {
'foo[^abc] bar',
'',
'[^abc]: Baz',
].join('\n'), {footnotes: true}));
].join('\n')));

const elementNode = ReactDOM.findDOMNode(element);
const definitions = elementNode.children[1];
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ export default function markdownToJSX(markdown, remarkOptions = {}) {
let ast;

remarkOptions.position = remarkOptions.position || false;
remarkOptions.footnotes = remarkOptions.footnotes || true;

try {
ast = parse(markdown, remarkOptions);
Expand Down

0 comments on commit 8764bb1

Please sign in to comment.