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

Fix the feature keyword issue #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix the feature keyword issue #20

wants to merge 1 commit into from

Conversation

SagarGi
Copy link
Contributor

@SagarGi SagarGi commented Jun 30, 2022

This PR tries to fix this #16.

I have changes the regex for the Feature: keyword not to count it as when the Feature: is as text

@SagarGi SagarGi force-pushed the OnlyOneFeatureIssue branch 3 times, most recently from e5ca064 to 6b981e9 Compare July 1, 2022 10:50
Copy link
Member

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing the regex would be the way to go

feature: /(?<!\S)Feature:/g,

@SagarGi
Copy link
Contributor Author

SagarGi commented Jul 1, 2022

fixing the regex would be the way to go

feature: /(?<!\S)Feature:/g,

will try to fix it with regex.

@SagarGi SagarGi requested a review from SwikritiT July 3, 2022 09:17
@SagarGi SagarGi requested a review from saw-jan July 4, 2022 09:00
@SagarGi SagarGi changed the title [experiment-only][donot-merge]Fix the feature keyword issue Fix the feature keyword issue Jul 4, 2022
@SagarGi SagarGi marked this pull request as ready for review July 4, 2022 09:03
Copy link

@kiranparajuli589 kiranparajuli589 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 🤞

@@ -1,6 +1,6 @@
module.exports = {
globalMatch: {
feature: /(?<!\S)Feature:/g,
feature: /(?<!\S)(?:^| )Feature:/gm,
Copy link
Member

@saw-jan saw-jan Jul 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the regex will match with the following:

   some text Feature: description

Also add a test for this case

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SagarGi Also, add test for the tabs

<tab><tab>Feature: description

@saw-jan
Copy link
Member

saw-jan commented Jul 5, 2022

@SagarGi If the appropriate regex cannot found then one solution would be:

  • split the file by newline (\n)
  • traverse the list of lines
  • trim each line
  • and test trimmed line with simpler regex (^Feature(?=:))

@individual-it
Copy link
Contributor

What is the status of this?

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

Successfully merging this pull request may close these issues.

4 participants