Closed tflo closed 5 years ago
Hello Tom, sorry for late reply, I was busy recently.
You are completely right, current implementation will fail on your given footnotes. It's shame I completely forgot to test these cases.
I will update the code right now. I hope, however, it will not break anything else.
I hope, however, it will not break anything else.
So far, it works fine for me with these types of footnotes:
[^1]
[^12]
[^blahblah]
– Tom
With
const index = node.id.substring(6,7);
you are just getting the first character of the string.It happens that I name my footnotes by something semantically more expressive, like for example
[^usage]
(instead of[^1]
).In these cases your substring implementation will fail. (And also if you have numerical footnote numbers > 9).
So, why not change it to…
This would take all characters, starting at position 6, but not limited to position 6.
As already said in the other issue post, I’m a JS-ignorant, so, please let me know if/why this would be no good.