Skip to content

Commit

Permalink
JiraLinkInlineParser.cs - prevent Jira key's to start with a digit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mysteryduck001 authored May 3, 2021
1 parent 8ce6f4d commit 8aa0948
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Markdig/Extensions/JiraLinks/JiraLinkInlineParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ public override bool Match(InlineProcessor processor, ref StringSlice slice)
var startKey = slice.Start;
var endKey = slice.Start;

//read as many uppercase characters as required - project key
// the first character of the key can not be a digit.
if (current.IsDigit())
{
return false;
}

// read as many uppercase characters or digits as required - project key
while (current.IsAlphaUpper() || current.IsDigit())
{
endKey = slice.Start;
Expand Down

0 comments on commit 8aa0948

Please sign in to comment.