diff --git a/lib/rouge/lexers/toml.rb b/lib/rouge/lexers/toml.rb index a3e5ae1eba..242bd5dd00 100644 --- a/lib/rouge/lexers/toml.rb +++ b/lib/rouge/lexers/toml.rb @@ -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 diff --git a/spec/visual/samples/toml b/spec/visual/samples/toml index 1f012d3ff9..fefd4424c5 100644 --- a/spec/visual/samples/toml +++ b/spec/visual/samples/toml @@ -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"