Skip to content

Commit

Permalink
Update SnippetKeyReader.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jul 29, 2020
1 parent c7177df commit 0c71d57
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/MarkdownSnippets/Processing/SnippetKeyReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ public static bool TryExtractKeyFromLine(Line line, [NotNullWhen(true)] out stri
}

key = key.Trim();
if (KeyValidator.IsInValidKey(key))
{
throw new MarkdownProcessingException($@"Invalid syntax for the snippet '{key}': Cannot contain whitespace or start/end with symbols.", line.Path, line.LineNumber);
}
//TODO: better validation
//if (KeyValidator.IsInValidKey(key))
//{
// throw new MarkdownProcessingException($@"Invalid syntax for the snippet '{key}': Cannot contain whitespace or start/end with symbols.", line.Path, line.LineNumber);
//}
return true;
}

Expand Down

0 comments on commit 0c71d57

Please sign in to comment.