Skip to content

Commit

Permalink
Fixed reading ReSentences with empty value
Browse files Browse the repository at this point in the history
Changed RegEx to allow for sentences with empty values.
Fixes danikf#97
  • Loading branch information
Deantwo authored Mar 6, 2024
1 parent c2d27b4 commit 562e74b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tik4net/Api/ApiSentence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public string Tag

public ApiSentence(IEnumerable<string> words)
{
Regex keyValueRegex = new Regex("^=?(?<KEY>[^=]+)=(?<VALUE>.+)$", RegexOptions.Singleline);
Regex keyValueRegex = new Regex("^=?(?<KEY>[^=]+)=(?<VALUE>.*)$", RegexOptions.Singleline);
foreach(string word in words)
{
Match match = keyValueRegex.Match(word);
Expand Down

0 comments on commit 562e74b

Please sign in to comment.