diff --git a/Common/UBBParser.cs b/Common/UBBParser.cs index a5bcd83..7f4e11a 100644 --- a/Common/UBBParser.cs +++ b/Common/UBBParser.cs @@ -33,7 +33,7 @@ namespace FLocal.Common { { ":lol:", "lol" }, }; - private static readonly Dictionary SMILEYS_DATA = (from smile in SMILEYS select new KeyValuePair(new Regex("(^|\\s+|>)" + Regex.Escape(smile.Key) + "($|\\s+|<)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline), match => match.Groups[1] + "\""" + match.Groups[2])).ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + private static readonly Dictionary SMILEYS_DATA = (from smile in SMILEYS select new KeyValuePair(new Regex("(^|\\s|>)" + Regex.Escape(smile.Key) + "($|\\s|<)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline), match => match.Groups[1] + "\""" + match.Groups[2])).ToDictionary(kvp => kvp.Key, kvp => kvp.Value); private static readonly Dictionary TYPOGRAPHICS = new Dictionary { { new Regex("(\\s+)--?(\\s+)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline), match => match.Groups[1] + "–" + match.Groups[2] }, @@ -47,7 +47,7 @@ namespace FLocal.Common { } public string Format(string source) { - string result = this.inner.Format(source); + string result = this.inner.Format(source).Replace(" ", " "); foreach(var smile in SMILEYS_DATA) { result = smile.Key.Replace(result, smile.Value); }