From cb837c13b513352300e72c3b78f9af7cfbdf6153 Mon Sep 17 00:00:00 2001 From: DaTekShaman Date: Mon, 19 Jan 2026 16:55:39 +0300 Subject: [PATCH] Refactor tSubstitution variable to tSubstitutionTable for clarity --- power-query/fReplaceFunction.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/power-query/fReplaceFunction.m b/power-query/fReplaceFunction.m index 1613542..fff019d 100644 --- a/power-query/fReplaceFunction.m +++ b/power-query/fReplaceFunction.m @@ -6,15 +6,15 @@ let bIsWholeCell = if (bWholeCell = null) then true else bWholeCell, bIsTagged = not (sTag = null), - tSubstitution = if tSubstitution = null then - if bIsTagged then - try Table.SelectRows(fP("RENAMING_RULES"), each ([#"#"] = sTag)) otherwise fP("RENAMING_RULES") - else - fP("RENAMING_RULES") - else - tSubstitution, + tSubstitutionTable = if tSubstitution = null then + if bIsTagged then + try Table.SelectRows(fP("RENAMING_RULES"), each ([#"#"] = sTag)) otherwise fP("RENAMING_RULES") + else + fP("RENAMING_RULES") + else + tSubstitution, - tSubstBuffer = Table.Buffer(tSubstitution), + tSubstBuffer = Table.Buffer(tSubstitutionTable), ReplacedText = List.Accumulate(Table.ToRows(tSubstBuffer), sInputText, (state, substitution) => if bIsWholeCell then if (state = substitution{0}) then