Closed john-cj closed 7 years ago
No plans to change defaults now. You can override renderer and customize look for your needs. That does not require any change in package.
Ok, thanks. As I understand, you mean some custom function, like shown in markdown-it-container readme, right?
md.use(require('markdown-it-container'), 'spoiler', {
validate: function(params) {
return params.trim().match(/^spoiler\s+(.*)$/);
},
render: function (tokens, idx) {
var m = tokens[idx].info.trim().match(/^spoiler\s+(.*)$/);
if (tokens[idx].nesting === 1) {
// opening tag
return '<details><summary>' + md.utils.escapeHtml(m[1]) + '</summary>\n';
} else {
// closing tag
return '</details>\n';
}
}
});
Hm, probably will be a bit tricky for newbies like me, hah :smiley:
Currently, duplicated references looks like this:
Which means "first repeat of second footnote". From my very personal point of view, it looks a bit confusing. There are 2 reasons:
Possible solution (Just a draft, I haven't seriously thinked about it. But at first glance, looks ok)
Use dash instead of colon. Also, if there are multiple references for single footnote, the first reference should be prefixed with 1-, second with 2- and so on. If there are only one reference, then there are no prefixes is needed. Example:
Update
Another idea, maybe even better, is just leave references plain. Example:
This is more logical, because reference is link to "something". And so, references "2:1" and "2:2" could be incorrectly interpreted by the reader as links to different footnotes.
Wikipedia agrees with me, see screenshot. There are no pre- or post-fixes before/after "[3]" in main text.
Screenshot taked from article about Times New Roman. You could check it yourself: https://en.wikipedia.org/wiki/Times_New_Roman