Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ Guard Expansion Doesn't Work on Windows #546

Open
rgarber11 opened this issue Jan 15, 2025 · 2 comments
Open

C++ Guard Expansion Doesn't Work on Windows #546

rgarber11 opened this issue Jan 15, 2025 · 2 comments

Comments

@rgarber11
Copy link

In the C++ #guard snippet, the repeated section to change the path: ${TM_DIRECTORY/.*[\\\/](.*)/_${1:/upcase}/} does not support Windows paths with C:... syntax.

Instead, they appear as:

#ifndef INCLUDEC:\Users\rg102\CompileCollective\src_SCAN_H_
#define INCLUDEC:\Users\rg102\CompileCollective\src_SCAN_H_



#endif  // INCLUDEC:\Users\rg102\CompileCollective\src_SCAN_H_

Changing the match group to [\\/\\\\] solves this problem while maintaining *nix compatibility.

Now, on Windows you get:

#ifndef INCLUDE_SRC_SCAN_H_
#define INCLUDE_SRC_SCAN_H_



#endif  // INCLUDE_SRC_SCAN_H_

And you get the same thing on Linux.

If needed, I can submit a PR fixing this.

@OkelleyDevelopment
Copy link
Collaborator

@rgarber11 feel free to raise a PR 🙌

@rgarber11
Copy link
Author

Opened PR #552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants