You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There, I removed ^ and it then worked. Do you know a simple explanation why ^ is not accepted? I checked with my .m files and the rule including ^ results in positive matches when using regex search functionality of ST4 editor. So, the problem should not be with my .m files.
You'll have to provide me with a minimal example of what you are trying to match before I can look into this further. The pattern is great, but there is not enough context.
Off the top of my head, it might be that you need to enable the multiline regex flag. I don't recall if that is enabled by default or not. It might not be.
Thanks for the super quick reply. Just to avoid confusion or extra work for you, the JSON configuration I copied above was the default setting that you provided with your ST package. I copied it here for ease of reference.
In my ST4, when I open any Objective C .m file (e.g., I am now working on this file, ST4 opens them with Wolfram syntax highlight, as it believes it is a file related to Wolfram Mathematica.
Your ApplySyntax package works perfectly if I copy your default configuration and remove the caret char ^.
I also have MATLAB syntax highlighting in my ST4 editor.
Unfortunately, all three languages share the same extension .m That's why your package is so useful in these cases.
Do you think it is sufficient for you to reproduce the issue?
Thanks! I made it work with the default rule including ^. I don't know why the caret was so special. However, I found a mistake in the way my Objective-C.sublime-settings was configured:
I had for some strange reasons extensions set to an empty array. Now by, adding m, your ST package works like a charm.
I am sorry if I bothered you with this issue. It was suspicious to me that it was only working without ^ in the regex. If you think everything is ok, let's close the issue.
Repository owner locked and limited conversation to collaborators on Feb 18, 2025
Activity
facelessuser commentedon Feb 16, 2025
You'll have to provide me with a minimal example of what you are trying to match before I can look into this further. The pattern is great, but there is not enough context.
Off the top of my head, it might be that you need to enable the multiline regex flag. I don't recall if that is enabled by default or not. It might not be.
alberti42 commentedon Feb 16, 2025
Thanks for the super quick reply. Just to avoid confusion or extra work for you, the JSON configuration I copied above was the default setting that you provided with your ST package. I copied it here for ease of reference.
In my ST4, when I open any Objective C
.mfile (e.g., I am now working on this file, ST4 opens them with Wolfram syntax highlight, as it believes it is a file related to Wolfram Mathematica.Your ApplySyntax package works perfectly if I copy your default configuration and remove the caret char
^.I also have MATLAB syntax highlighting in my ST4 editor.
Unfortunately, all three languages share the same extension
.mThat's why your package is so useful in these cases.Do you think it is sufficient for you to reproduce the issue?
facelessuser commentedon Feb 16, 2025
Please provide conflicting package links you use, such as the Wolfram Mathematica package.
I'll try and reproduce when I get a chance.
alberti42 commentedon Feb 16, 2025
Thanks! I made it work with the default rule including
^. I don't know why the caret was so special. However, I found a mistake in the way myObjective-C.sublime-settingswas configured:Instead of thiss:
{ "translate_tabs_to_spaces": true, "tab_size": 4, "extensions": [ "m", ], }I had for some strange reasons
extensionsset to an empty array. Now by, addingm, your ST package works like a charm.I am sorry if I bothered you with this issue. It was suspicious to me that it was only working without
^in the regex. If you think everything is ok, let's close the issue.