Some settings can't be used in TOML config files. #1703
Labels
contribution welcome
Contributions welcome
good first issue
Good for newcomers
type: bug
Something isn't working
Bug report
Steps to reproduce
Notate the following setting in TOML instead of JS:
Which in theory would be:
What is expected?
‒
What is actually happening?
The TOML extension of VS Code reports: "Cannot add value of type InlineTable to array of type String. Toml Parser" - which is correct. Arrays in TOML only support values of the same type. The array at
head[0]
contains a mix ofString
andInlineTable
though, which is not supported.Other relevant information
There's an issue on the TOML repository about mixed typed arrays. TL;DR is: Some programming languages don't support arrays with mixed values, so it's safer to not support that in TOML either. That makes TOML files easier to read in more languages.
To fully support TOML config files the config structure needs to be changed at some points. Removing TOML support would be a bummer though, because I like the format.
One alternative example for the
head
config (TOML):Which would be equivalent to this JS:
npx vuepress info
in my VuePress project:I don't think that's relevant here.
The text was updated successfully, but these errors were encountered: