markdown-it / markdown-it-footnote

Footnotes plugin for markdown-it markdown parser
https://markdown-it.github.io/
MIT License
212 stars 59 forks source link

Extend plugin options for header #12

Closed justb3a closed 8 years ago

justb3a commented 8 years ago

hei this PR adds another option called header which allows you to add a headline inside your section (optional).

<hr class="footnotes-sep">
<section class="footnotes">
  <h3 class="footnotes-header">headline</h3> 
  <ol class="footnotes-list">
    ...
  </ol>
</section>

One more hint (I know you pushed just some minutes before and this is still work in process): if I want to use the option caption and/or anchor, I get the following error: [TypeError: anchorFn // captionFn is not a function].

import mdfootnote from 'markdown-it-footnote';
md.parser.use(mdfootnote, {
    header: '{{> svg name="arrow" }}{{__ "footnote"}}',
    caption: 'foo',
    anchor: 'test'
  });

Thanks!

rlidwka commented 8 years ago

I get the following error: [TypeError: anchorFn // captionFn is not a function].

@justonestep , it's very much work in progress, and it's going to be rewritten from scratch at least a few more times around. So I can't really say anything yet.

rlidwka commented 8 years ago

Oops... I deleted the branch, and github apparently auto-closed this PR.

Anyway, we decided to get rid of caption and anchor altogether because you can just override renderer functions. If you think those plugin options are needed, please open a separate issue.