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

URL参数sort_script无效 #280

Open
mwhds97 opened this issue Dec 11, 2020 · 5 comments
Open

URL参数sort_script无效 #280

mwhds97 opened this issue Dec 11, 2020 · 5 comments

Comments

@mwhds97
Copy link

mwhds97 commented Dec 11, 2020

经测试,将URLEncode处理后的js脚本传入sort_script参数,节点不会按照预期进行排序。(sort_flag已设置为true)
在pref中将sort_script选项设置为js源码,则可以正常排序。

查看源码发现,URL中的sort_script参数仅被用来设定tribool argUseSortScript,只有pref中的脚本会被使用。而filter_script参数则被正确解析到std::string argFilterScript,经测试工作正常。

@mwhds97
Copy link
Author

mwhds97 commented Dec 12, 2020

已提交PR #281 ,经过编译测试,已经修复了这个问题。
另外,在测试中还发现,由于std::sort是不稳定排序,极易让节点顺序变得混乱。因此使用std::stable_sort更为合理。

@icpz
Copy link

icpz commented Dec 17, 2020

@tindy2013
Same problem here. FYI the argument does not support 'path:/path/to/script' either, even README says it does.

@mwhds97
Copy link
Author

mwhds97 commented Dec 17, 2020

@tindy2013
Same problem here. FYI the argument does not support 'path:/path/to/script' either, even README says it does.

I've tried to fix this in my PR.

@mwhds97
Copy link
Author

mwhds97 commented Mar 27, 2021

#329 同时修复了排序脚本执行结果与预期相反的问题

@mwhds97
Copy link
Author

mwhds97 commented Jun 2, 2021

#347 尝试修复 qjs 更新导致的 Windows 版本编译错误

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

No branches or pull requests

2 participants