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

JiraLinkInlineParser.cs - Make digits in JiraKey's posible #548

Merged
merged 6 commits into from
May 8, 2021

Conversation

Mysteryduck001
Copy link
Contributor

A digit can also be part of the project key for example T3ST is a valid project key and T3ST-123 is thus a valid Jira issue number but it will not be recognized by this tool.
I propose to add an OR IsDigit() check like: 'while (current.IsAlphaUpper() || current.IsDigit())'
Thanks for considering to update.

Copy link
Collaborator

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

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

Thanks! Could you please also add a test for this case?

Adding an example here: https://github.com/xoofx/markdig/blob/master/src/Markdig.Tests/Specs/JiraLinks.md
And then re-running the SpecFileGen project

@@ -41,7 +41,7 @@ public override bool Match(InlineProcessor processor, ref StringSlice slice)
var endKey = slice.Start;

//read as many uppercase characters as required - project key
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
//read as many uppercase characters as required - project key
// read as many uppercase characters or digits as required - project key

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, I see everything is added for the test en verified.
I've added a test to check if the first char in the key is not a digit as this is not allowed by Jira.

@xoofx xoofx merged commit 27f625f into xoofx:master May 8, 2021
@xoofx
Copy link
Owner

xoofx commented May 8, 2021

Thanks!

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.

3 participants