File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
SharpDenizenTools/MetaHandlers Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11using FreneticUtilities . FreneticExtensions ;
2+ using FreneticUtilities . FreneticToolkit ;
23using SharpDenizenTools . MetaObjects ;
34using System ;
45using System . Collections . Generic ;
@@ -11,6 +12,9 @@ namespace SharpDenizenTools.MetaHandlers
1112 /// <summary>Helper to parse tags.</summary>
1213 public static class TagHelper
1314 {
15+ /// <summary>Matcher for basic whitespace characters.</summary>
16+ public static AsciiMatcher Whitespace = new ( " \t \r \n " ) ;
17+
1418 /// <summary>Parses the plaintext of a tag into something analyzable.</summary>
1519 public static SingleTag Parse ( string tag , Action < string > trackErrors )
1620 {
@@ -66,7 +70,7 @@ public static SingleTag Parse(string tag, Action<string> trackErrors)
6670 output . Fallback = tag [ ( i + 2 ) ..] ;
6771 return output ;
6872 }
69- else if ( foundABracket && brackets == 0 && ! declaredMisformat )
73+ else if ( foundABracket && brackets == 0 && ! declaredMisformat && ! Whitespace . IsMatch ( tag [ i ] ) )
7074 {
7175 declaredMisformat = true ;
7276 trackErrors ( "Invalid tag format, text after closing ']' symbol before '.' symbol" ) ;
You can’t perform that action at this time.
0 commit comments