Skip to content

Comments

Quote schematic file names in //schem list #3445

Open
Madelyyn wants to merge 3 commits intoIntellectualSites:mainfrom
Madelyyn:feature/fix/docs/quote-schem-names
Open

Quote schematic file names in //schem list #3445
Madelyyn wants to merge 3 commits intoIntellectualSites:mainfrom
Madelyyn:feature/fix/docs/quote-schem-names

Conversation

@Madelyyn
Copy link

Description

Adds quotes to schematic file names that would be invalid w/o in the auto complete of //schem list

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@Madelyyn Madelyyn requested a review from a team as a code owner January 26, 2026 02:55
@github-actions github-actions bot added Bugfix This PR fixes a bug documentation Feature This PR adds a new feature labels Jan 26, 2026
Copy link
Member

@SirYwell SirYwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(FA)WE currently doesn't allow saving schematics with spaces in their name, even when quoting it. Should that be changed too?

Comment on lines +546 to +548
if (value.isEmpty()) {
return "\"\"";
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to handle an empty string like that?

return "\"\"";
}

boolean quote = value.indexOf(' ') >= 0 || value.indexOf('\t') >= 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the idea behind including \t here?

return value;
}

String escaped = value.replace("\\", "\\\\").replace("\"", "\\\"");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the intention behind this? It doesn't seem like Piston can deal with \" escaping, so this won't work if a file name contains a ".

return UUID_PATTERN.matcher(str).find();
}

public static String escape(String value) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method should have documentation describing its behavior.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not going to make any more changes to this, it’s a tiny merge to fix an annoyance I had- didn’t really intend on coming back in three weeks😭. I can move this it an issue instead if that’s better. Maintainer edits are also on.

@Madelyyn
Copy link
Author

(FA)WE currently doesn't allow saving schematics with spaces in their name, even when quoting it. Should that be changed too?

If you want

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix This PR fixes a bug Feature This PR adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants