diff --git a/SabreTools.Serialization/Wrappers/WrapperBase.cs b/SabreTools.Serialization/Wrappers/WrapperBase.cs index 86e3c386..eea75548 100644 --- a/SabreTools.Serialization/Wrappers/WrapperBase.cs +++ b/SabreTools.Serialization/Wrappers/WrapperBase.cs @@ -347,7 +347,15 @@ namespace SabreTools.Serialization.Wrappers // If we have a cached string greater than the limit if (cachedChars.Count >= charLimit) - sourceStrings.Add(new string([.. cachedChars])); + { + // Get the string from the cached characters + string cachedString = new([.. cachedChars]); + cachedString = cachedString.Trim(); + + // Only include trimmed strings over the limit + if (cachedString.Length >= charLimit) + sourceStrings.Add(cachedString); + } return sourceStrings; }