From 5a24e3ba60e28e0cfde540696630b3c5a4db6dfd Mon Sep 17 00:00:00 2001 From: Tobias Schmitz Date: Fri, 13 Sep 2024 16:37:48 +0200 Subject: [PATCH] fix: parse sections containing whitespace (#147) --- lua/crates/toml.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/crates/toml.lua b/lua/crates/toml.lua index 634a795..d2b454b 100644 --- a/lua/crates/toml.lua +++ b/lua/crates/toml.lua @@ -583,7 +583,7 @@ function M.parse_crates(buf) local line_nr = i - 1 ---@type string, string - local section_start, section_text, section_end = line:match("^%s*()%[([^%s]+)()%s*$") + local section_start, section_text, section_end = line:match("^%s*()%[(.-)()%s*$") if section_text then if dep_section then -- close line span