Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lua/crates/toml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ function M.parse_section(text)
}

local target = prefix

local workspace = prefix:match("^workspace%s*%.$")
if workspace then

target = ""
prefix = ""
end

local dev_target = prefix:match("^(.*)dev%-$")
if dev_target then
target = vim.trim(dev_target)
Expand Down
8 changes: 8 additions & 0 deletions teal/crates/toml.tl
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ function M.parse_section(text: string): Section
}

local target = prefix

local workspace = prefix:match("^workspace%s*%.$")
if workspace then
-- the workspace table only allows a regular dependencies sub-table
target = ""
prefix = ""
end

local dev_target = prefix:match("^(.*)dev%-$")
if dev_target then
target = vim.trim(dev_target)
Expand Down