BarkingMouseStudio / haste

Open-source implementation of the original quick search for Unity 3D.
MIT License
14 stars 2 forks source link

rebuild index exception #3

Open friuns2 opened 5 years ago

friuns2 commented 5 years ago

when i click rebuild index i get this error unity3d 2018.3.12f

ArgumentException: parsing "\s+[\%#\&_]+\w$" - Unrecognized escape sequence _. System.Text.RegularExpressions.RegexParser.ScanCharEscape () (at <3845a180c26b4889bc2d47593a665814>:0) System.Text.RegularExpressions.RegexParser.ScanCharClass (System.Boolean caseInsensitive, System.Boolean scanOnly) (at <3845a180c26b4889bc2d47593a665814>:0) System.Text.RegularExpressions.RegexParser.CountCaptures () (at <3845a180c26b4889bc2d47593a665814>:0) System.Text.RegularExpressions.RegexParser.Parse (System.String re, System.Text.RegularExpressions.RegexOptions op) (at <3845a180c26b4889bc2d47593a665814>:0) System.Text.RegularExpressions.Regex..ctor (System.String pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout, System.Boolean useCache) (at <3845a180c26b4889bc2d47593a665814>:0) System.Text.RegularExpressions.Regex..ctor (System.String pattern, System.Text.RegularExpressions.RegexOptions options) (at <3845a180c26b4889bc2d47593a665814>:0) Haste.HasteMenuItemSource..cctor () (at Assets/Haste/Editor/Sources/HasteMenuItemSource.cs:15) Rethrow as TypeInitializationException: The type initializer for 'Haste.HasteMenuItemSource' threw an exception. Haste.Haste+<>c.<.cctor>b__33_2 () (at Assets/Haste/Editor/Haste.cs:96) Haste.HasteWatcher+d__28.MoveNext () (at Assets/Haste/Editor/HasteWatcher.cs:116) Haste.HasteSchedulerNode.Next () (at Assets/Haste/Editor/HasteScheduler.cs:45) Haste.HasteScheduler.Tick () (at Assets/Haste/Editor/HasteScheduler.cs:116) Haste.Haste.Update () (at Assets/Haste/Editor/Haste.cs:262) UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)

jimfleming commented 5 years ago

Weird. Seems C# doesn't like my RegEx anymore. That code is on this line: Assets/Haste/Editor/Sources/HasteMenuItemSource.cs#L15

I think removing the backslash before the underscore should fix it.

friuns2 commented 5 years ago

yes it fixed it