Skip to content

Commit

Permalink
Handle "." in short names
Browse files Browse the repository at this point in the history
  • Loading branch information
volkanceylan committed Sep 11, 2024
1 parent 8fe6e43 commit 36644bc
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,16 @@ string normalizeParts(string s)
cw.InBrace(() =>
{
var firstParts = new HashSet<string>(files.Select(x => normalizeParts(getStrippedName(x).Split('/').First())));
var byShortName = files.ToLookup(x => normalizeParts(getStrippedName(x).Split('/').Last()));
var shortNames = files.ToLookup(x => getStrippedName(x).Split('/').Last())
var byShortName = files.ToLookup(x => normalizeParts(getStrippedName(x).Split('/').Last()))
.OrderBy(x => x.Key)
.Where(x => !firstParts.Contains(x.Key) &&
x.Count() == 1);
foreach (var shortName in shortNames)
foreach (var shortName in byShortName)
cw.IndentedLine("public const string " + shortName.Key + " = \"~" + EsmAssetBasePath + "/" +
System.IO.Path.ChangeExtension(shortName.First(), ".js").Replace('\\', '/') + "\";");
if (shortNames.Any())
if (byShortName.Any())
cw.AppendLine();
var last = Array.Empty<string>();
Expand Down

0 comments on commit 36644bc

Please sign in to comment.