Skip to content

Commit ddba705

Browse files
committed
style: code formatting with JuliaFormatter
1 parent e06b85a commit ddba705

35 files changed

Lines changed: 2338 additions & 1718 deletions

docs/make.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,4 @@ makedocs(
2525
],
2626
)
2727

28-
deploydocs(
29-
repo = "github.com/toon-format/ToonFormat.jl.git",
30-
devbranch = "main",
31-
)
28+
deploydocs(repo = "github.com/toon-format/ToonFormat.jl.git", devbranch = "main")

src/ToonFormat.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ export EncodeOptions, DecodeOptions
6363
export COMMA, TAB, PIPE
6464

6565
# Export utility functions for testing
66-
export escape_string, unescape_string, find_first_unquoted, is_safe_identifier, needs_quoting
66+
export escape_string,
67+
unescape_string, find_first_unquoted, is_safe_identifier, needs_quoting
6768
export to_parsed_lines, parse_array_header, parse_delimited_values, parse_key
6869

6970
end # module

src/constants.jl

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ const TAB = "\t"
1111
const PIPE = "|"
1212
const DEFAULT_DELIMITER = COMMA
1313

14-
const DELIMITERS = Dict(
15-
"comma" => COMMA,
16-
"tab" => TAB,
17-
"pipe" => PIPE
18-
)
14+
const DELIMITERS = Dict("comma" => COMMA, "tab" => TAB, "pipe" => PIPE)
1915

2016
# Special characters
2117
const COLON = ":"
@@ -39,21 +35,10 @@ const FALSE_LITERAL = "false"
3935
const NULL_LITERAL = "null"
4036

4137
# Escape sequences
42-
const ESCAPE_CHARS = Dict(
43-
'\\' => '\\',
44-
'"' => '"',
45-
'n' => '\n',
46-
'r' => '\r',
47-
't' => '\t'
48-
)
49-
50-
const CHARS_TO_ESCAPE = Dict(
51-
'\\' => "\\\\",
52-
'"' => "\\\"",
53-
'\n' => "\\n",
54-
'\r' => "\\r",
55-
'\t' => "\\t"
56-
)
38+
const ESCAPE_CHARS = Dict('\\' => '\\', '"' => '"', 'n' => '\n', 'r' => '\r', 't' => '\t')
39+
40+
const CHARS_TO_ESCAPE =
41+
Dict('\\' => "\\\\", '"' => "\\\"", '\n' => "\\n", '\r' => "\\r", '\t' => "\\t")
5742

5843
# Validation patterns
5944
const UNQUOTED_KEY_PATTERN = r"^[A-Za-z_][A-Za-z0-9_.]*$"

0 commit comments

Comments
 (0)