Skip to content

Commit

Permalink
toml: support inline tables in arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
sersorrel committed Aug 27, 2024
1 parent c5e4a8a commit 0518c83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/rouge/lexers/toml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class TOML < RegexLexer
mixin :esc_str
rule %r/\,/, Punctuation
rule %r/\[/, Punctuation, :array
rule %r/\{/, Punctuation, :inline
end

state :dq do
Expand Down
1 change: 1 addition & 0 deletions spec/visual/samples/toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ nested_arrays_of_ints = [ [ 1, 2 ], [3, 4, 5] ]
nested_mixed_array = [ [ 1, 2 ], ["a", "b", "c"] ]
string_array = [ "all", 'strings', """are the same""", '''type''' ]
link-libraries = ["mylib::mylib"]
points = [ { x = 1, y = 2 }, { x = 3, y = 4 } ]

# Dotted keys
physical.color = "orange"
Expand Down

0 comments on commit 0518c83

Please sign in to comment.