Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果目录你们有数字到10以上的文件夹,生成的Summary就按前面的1排序了 #9

Open
Elinu opened this issue Nov 27, 2016 · 1 comment

Comments

@Elinu
Copy link

Elinu commented Nov 27, 2016


1-name
10-name10
2-name2

@imfly
Copy link
Owner

imfly commented Nov 28, 2016

这是排序部分的bug,因为是先判断文件夹,就导致下面的代码并未执行:

 if (sortedBy) {
            var pattern = "(^[\\da-zA-Z]*)" + sortedBy;
            var reg = RegExp(pattern);
            if(a.name.match(reg) && b.name.match(reg)){
              var aNum = a.name.match(reg)[1];
              var bNum = b.name.match(reg)[1];
              return aNum - bNum;
            }
        }

最近事情太多,回头修正。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants