markup-it icon indicating copy to clipboard operation
markup-it copied to clipboard

More footnote support

Open mizunashi-mana opened this issue 8 years ago • 1 comments

  • Add title on footnote ref

Setting title has strong advantage. Modern browser present a tooltip for the footnote (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title). This provides more useful for site seeing.

However, there are problems for coding because one-to-one correspondence between markdown footnote reference and html tag is not possible.

ref: https://github.com/GitbookIO/markup-it/blob/master/syntaxes/markdown/inline.js#L12

  • Remove sup tag for footnote id on reffn

Now, footnote id are rendering to '<sup>' + refname + '</sup>. '. However, normal rendered text is very strange, and if we try to fix appearance, needs special support for theme.

We should use ol or '<span>' + refname + '.</span>'.

ref: https://github.com/GitbookIO/markup-it/blob/b6101714121f0d9a924d6a0199dc5d7b04586508/syntaxes/html/blocks.js#L36

mizunashi-mana avatar Jul 28 '16 06:07 mizunashi-mana

Adding to this: It would be good to be able to distinguish between actual blockquotes and footnotes in the HTML (through a class?). This would enable custom styling for footnotes, which is suboptimal right now.

(I tried adding some visual separation from the content, but was unable to do so. The closest i got was the following, but it breaks when there are actual blockquotes in the page content)

blockquote[id^="fn_"]:first-of-type { ..... }

noerw avatar Mar 23 '17 18:03 noerw