Closed DeoLeung closed 5 years ago
thanks for filing the issue. do you have a sample requirements file that you could provide?
b==1.1
# some comment
# continued comment
a==0.3
will expect
# some comment
# continued comment
a==0.3
b==1.1
currently
a==0.3
# some comment
# continued comment
b==1.1
also better to normalize the ('-')
Fixed by https://github.com/rehandalal/sort-requirements/commit/3cd56c5fbb5f3abc5a28fdcfab63d916240db952.
Note: This will only pin comments directly above a requirement.
In other words... This will work:
a==0.3
# comment
# more comments
b==1.1
But this will not:
a==0.3
# comment
# more comments
b == 1.1
IMO at that point it becomes difficult to tell if the comment is linked to the line below it
thx it works
if there are comments, the comment will be in wrong place, maybe keep the comment stick to the next uncomment line