Vibe deck improvements
This commit is contained in:
@@ -227,11 +227,16 @@
|
||||
|
||||
foreach (var name in cardNames)
|
||||
{
|
||||
int idx = remaining.IndexOf(name, StringComparison.OrdinalIgnoreCase);
|
||||
if (idx != -1 && (bestIdx == -1 || idx < bestIdx))
|
||||
var pattern = $@"\b{System.Text.RegularExpressions.Regex.Escape(name)}\b";
|
||||
var match = System.Text.RegularExpressions.Regex.Match(remaining, pattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase);
|
||||
|
||||
if (match.Success)
|
||||
{
|
||||
bestIdx = idx;
|
||||
bestName = name;
|
||||
if (bestIdx == -1 || match.Index < bestIdx)
|
||||
{
|
||||
bestIdx = match.Index;
|
||||
bestName = match.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,5 +8,6 @@ builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
||||
builder.Services.AddTelerikBlazor();
|
||||
builder.Services.AddSingleton<Shared.Services.CardRenderingService>();
|
||||
|
||||
await builder.Build().RunAsync();
|
||||
Reference in New Issue
Block a user