diff --git a/TextParser/Data/DataManipulationHelpers.cs b/TextParser/Data/DataManipulationHelpers.cs index 408a39c..93f6418 100644 --- a/TextParser/Data/DataManipulationHelpers.cs +++ b/TextParser/Data/DataManipulationHelpers.cs @@ -36,7 +36,7 @@ public static class DataManipulationHelpers var newList = new List(); foreach (List dataItemList in data) { - newList.Add(transformer(dataItem)); + newList.Add(transformer(dataItemList)); } return newList; } diff --git a/TextParser/Data/TokenConverter.cs b/TextParser/Data/TokenConverter.cs index 33f5753..2b39a54 100644 --- a/TextParser/Data/TokenConverter.cs +++ b/TextParser/Data/TokenConverter.cs @@ -159,17 +159,22 @@ public class TokenConverter public TokenConverter Filter(params InputType[] inputTypes) { - var newTokenList = new List>() + var newTokenListList = new List>(); - foreach(var token in rawTokens) + foreach(var tokenList in rawTokens) { - if(inputTypes.Contains(token.GetInputType())) + var newTokenList = new List(); + foreach(var token in tokenList) { - newTokenList.Add(token); + if(inputTypes.Contains(token.GetInputType())) + { + newTokenList.Add(token); + } } + newTokenListList.Add(newTokenList); } - this.rawTokens = newTokenList; + this.rawTokens = newTokenListList; return this; }