-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
Conversation
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.
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 |
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.
//read as many uppercase characters as required - project key | |
// read as many uppercase characters or digits as required - project key |
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.
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.
Thanks! |
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.