Skip to content

Commit

Permalink
Disallow #, ?, /, and ^ formatters
Browse files Browse the repository at this point in the history
?, #, /, and ^ are used for conditions and loops. Reserving
~ for potentially controlling whitespace in the future.
  • Loading branch information
mtdowling committed Mar 21, 2022
1 parent 9d78b3a commit 715b420
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ final class CodeWriterFormatterContainer {

// Must be sorted for binary search to work.
static final char[] VALID_FORMATTER_CHARS = {
'!', '#', '%', '&', '*', '+', ',', '-', '.', '/', ';', '=', '?', '@',
'!', '%', '&', '*', '+', ',', '-', '.', ';', '=', '@',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '^', '_', '`', '~'};
'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '_', '`'};

private final Map<Character, BiFunction<Object, String, String>> formatters = new HashMap<>();
private final CodeWriterFormatterContainer parent;
Expand Down

0 comments on commit 715b420

Please sign in to comment.