Skip to content

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 force-pushed the OnlyOneFeatureIssue branch from 6b981e9 to 621c124 Compare July 4, 2022 08:55
@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 🤞

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?

@SagarGi
Copy link
Contributor Author

SagarGi commented Jan 9, 2025

This PR has been handed over to @ishabaral . She will take over it.

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.

6 participants