Refactor tSubstitution variable to tSubstitutionTable for clarity

This commit is contained in:
2026-01-19 16:55:39 +03:00
parent 02b4d94990
commit cb837c13b5

View File

@@ -6,15 +6,15 @@
let let
bIsWholeCell = if (bWholeCell = null) then true else bWholeCell, bIsWholeCell = if (bWholeCell = null) then true else bWholeCell,
bIsTagged = not (sTag = null), bIsTagged = not (sTag = null),
tSubstitution = if tSubstitution = null then tSubstitutionTable = if tSubstitution = null then
if bIsTagged then if bIsTagged then
try Table.SelectRows(fP("RENAMING_RULES"), each ([#"#"] = sTag)) otherwise fP("RENAMING_RULES") try Table.SelectRows(fP("RENAMING_RULES"), each ([#"#"] = sTag)) otherwise fP("RENAMING_RULES")
else else
fP("RENAMING_RULES") fP("RENAMING_RULES")
else else
tSubstitution, tSubstitution,
tSubstBuffer = Table.Buffer(tSubstitution), tSubstBuffer = Table.Buffer(tSubstitutionTable),
ReplacedText = List.Accumulate(Table.ToRows(tSubstBuffer), sInputText, (state, substitution) => ReplacedText = List.Accumulate(Table.ToRows(tSubstBuffer), sInputText, (state, substitution) =>
if bIsWholeCell then if bIsWholeCell then
if (state = substitution{0}) then if (state = substitution{0}) then