Refactor RemoveLegacyTags method to include modification tracking and update logging
Some checks failed
Auto Release Plugin / build-and-release (push) Failing after 12s

This commit is contained in:
CodeDevMLH
2026-02-19 18:36:08 +01:00
parent 22bf887d10
commit 82a1e8a178

View File

@@ -129,7 +129,7 @@ public class ScriptInjector
// MARK: Legacy Tags, remove in future versions
// Remove legacy tags
bool modified = false;
content = RemoveLegacyTags(content);
content = RemoveLegacyTags(content, ref modified);
if (modified)
{
_logger.LogInformation("Removed legacy tags from index.html.");
@@ -230,7 +230,7 @@ public class ScriptInjector
// MARK: Legacy Tags, remove in future versions
/// <summary>
/// Removes legacy script and css tags from the content.
/// Removes legacy script tags from the content.
/// </summary>
private string RemoveLegacyTags(string content, ref bool modified)
{
@@ -241,7 +241,6 @@ public class ScriptInjector
{
content = content.Replace(LegacyScriptTag + Environment.NewLine, "").Replace(LegacyScriptTag, "");
modified = true;
_logger.LogInformation("Legacy Seasonals script tag removed.");
}
return content;
}