gnab / remark

A simple, in-browser, markdown-driven slideshow tool.
http://remarkjs.com
MIT License
12.68k stars 856 forks source link

Can't find `slide.getSlideNumber`. #639

Open dmurdoch opened 3 years ago

dmurdoch commented 3 years ago

In this SO question https://stackoverflow.com/q/65146149/2554330, the poster wants to set a special slideNumberFormat to treat a particular slide as the last slide. I can use this format function

slideNumberFormat : function (current, total) {
  return 'Slide ' + current + ' of ' + (this.getSlideByName("mylastslide").getSlideIndex() + 1); }

but with incremental slides, the slide index isn't the same as the slide number, so I'd like to use

slideNumberFormat : function (current, total) {
  return 'Slide ' + current + ' of ' + (this.getSlideByName("mylastslide").getSlideNumber()); }

However, that fails, because slide.getSlideNumber doesn't exist in the minified library. Is there a way to get it to be exported?

dmurdoch commented 3 years ago

I just rebuilt remark.min.js from the v0.15.0 tag, and also from the main head, and both versions contained slide.getSlideNumber() properly. So the problem is only in the online version at http://remarkjs.com/downloads/remark-latest.min.js .

dmurdoch commented 3 years ago

It appears that http://remarkjs.com/downloads/remark-latest.min.js contains 0.14.1, not 0.15.0. If I use the latter the problem goes away.