Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #60 from Invvard/fix/issue-59-layout-download
Browse files Browse the repository at this point in the history
Fix/issue 59 layout download
  • Loading branch information
Invvard authored Apr 16, 2019
2 parents cf7f61b + 8667fca commit cb231b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ private string ExtractLayoutHashId(string layoutUrl)
Logger.TraceMethod();

var layoutHashIdGroupName = "layoutHashId";
var pattern = $"https://configure.ergodox-ez.com/layouts/(?<{layoutHashIdGroupName}>default|[a-zA-Z0-9]{{4}})(?:/latest/[0-9])?";
var pattern = $"https://configure.ergodox-ez.com/layouts/(?<{layoutHashIdGroupName}>default|[a-zA-Z0-9]{{4,}})(?:/latest/[0-9])?";
var layoutHashId = "default";

var regex = new Regex(pattern);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ [ InlineData("https://configure.ergodox-ez.com/layouts/j3o4", "j3o4") ]
[ InlineData("https://configure.ergodox-ez.com/layouts/r2d2/lat/9", "r2d2") ]
[ InlineData("https://configure.ergodox-ez.com/layouts/def/latest/0", "default") ]
[ InlineData("https://configure.ergodox-ez.com/layouts/_t3s/latest/0", "default") ]
[ InlineData("https://configure.ergodox-ez.com/layouts/t3s/latest/0", "default") ]
[ InlineData("https://configure.ergodox-ez.com/layouts/adbcd/latest/0", "adbcd") ]
[ InlineData("https://configure.ergodox-ez.com/layouts/asdfasdfasdfasdfgfasdffgasf/latest/0", "asdfasdfasdfasdfgfasdffgasf") ]
public void UpdateLayoutCommand_Execute(string layoutUrl, string expectedHashId)
{
//Arrange
Expand Down

0 comments on commit cb231b8

Please sign in to comment.