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

Refactor and test StartsAndEndsWithTag method #8909

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

Conversation

ivandrofly
Copy link
Member

Simplified the logic in StartsAndEndsWithTag by using arrays for prefix and suffix formats. Added a unit test to ensure the method handles various tag formats correctly.

Simplified the logic in StartsAndEndsWithTag by using arrays for prefix and suffix formats. Added a unit test to ensure the method handles various tag formats correctly.

Signed-off-by: Ivandro Jao <Ivandrofly@gmail.com>
var s1 = "- " + startTag;
var s2 = "-" + startTag;
var s3 = "- ..." + startTag;
var s4 = "- " + startTag + "..."; // - <i>...
Copy link
Member Author

Choose a reason for hiding this comment

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

this was always false too... as line 1228 would always match first

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.

1 participant