wzpan / hexo-theme-freemind

Most powerful bootstrap theme for hexo.

Home Page:http://hahack.com/hexo-theme-freemind-blog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in search.js

SeraphRoy opened this issue · comments

commented

At https://github.com/wzpan/hexo-theme-freemind/blob/master/source/js/search.js#L102

var match_content = content.substr(start, end);

I think it should be content.substring as the arguments for substr are start and length and the onces for substring are start and end. Not sure why this is undiscovered for so long as it makes a huge difference when I use it..

You are right. I've fixed it.
Indeed I don't used hexo-generator-search myself because I'm still using hexo 2.x rather than hexo 3.x.
I forked my version of hexo 2.x and have done a lot of customizations so I'm not willing to upgrade to 3.x.

commented

I see.. Yeah a simple fix should be good enough.