-
Notifications
You must be signed in to change notification settings - Fork 20
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
added new function-extractAssignedSring #42
Conversation
nirjas/binder.py
Outdated
Return the content of the string. | ||
''' | ||
content = [] | ||
regex = r'(?<=(=\s*\"))(.*?)(?=(\"))' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most scripting languages like PHP and JS, a string can also be denoted with single quotes $var = 'valid PHP string' ;
.
Would it make sense to capture both ['"]
and while creating output, ignore anything of length less than 2 (like C characters)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the code. I wonder if it meets the requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should work. Just a suggestion to check output
length before appending it to content to eliminate stuff like char c='c';
. Something like following
if output and len(output) > 1:
content.append([line_number, output.strip()])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the output. Could you merge this PR? Thx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Yoda-Canada , There are few extra empty lines here and there, Also updating the documentation with the changes might be a great help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kaushl2208 I have deleted the extras empty lines. Does the documentation mean README.md - documentation part? If it is, could you create a new issue for documentation? I need time to study this part because some flags haven't been introduced yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, Can You also update the documentation regarding the update you have made?
@Kaushl2208 I cannot edit the "https://github.com/fossology/Nirjas/wiki" page, and it also cannot clone to my repo. I only can edit the README.md, but cannot edit the linked page in the REDAME.md. Could you merge this PR and create a new issue for documentation? Thank you. |
Also, You can access the Readme and edit it. For wiki I will just add the new issue? |
Hey @Yoda-Canada , It will be great if you can squash all commits into one. We try to keep change history clean and easy to maintain. Rest everything looks good to me :D |
@Kaushl2208 I have squashed all commits to one. Please test it ASAP. Thx. |
Hey @Yoda-Canada , I will test it and merge it! Thank you for your contributions. |
added a new function named "extractAssignedSring" in binder.py file.