Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode Extension argdown.config.json: Incorrect syntax errors when using unquoted integers for relationsColors #354

Open
s6mike opened this issue May 21, 2022 · 0 comments

Comments

@s6mike
Copy link

s6mike commented May 21, 2022

Actually after further testing, I can use unquoted values in relationColors, and it will correctly use the palette number despite the syntax errors.

So the issue here is that using unquoted integers with relationColors triggers syntax errors (apart from 'contrary' which accepts unquoted integers), when it shouldn't because these are valid values for selecting palette index numbers.


Original issue details:

Putting this into argdown.config.json didn't work, all relations showed up as black:

"color": {
"colorScheme": "colorbrewer-paired",
"relationColors": {
"support": "3",
"entails": "3",
"attack": "5",
"contrary": "5",
"contradictory": "5",
"undercut": "2"
},

Changing it to this did work:
"relationColors": {
"support": "#2ca02c",
"entails": "#2ca02c",
"attack": "#d62728",
"contrary": "#d62728",
"contradictory": "#d62728",
"undercut": "#9467bd"
},

Note that, unlike "tagColors", syntax errors appear for relationColors when trying to use unquoted numbers (except for "contrary" relation). Might be that quoting forces numbers to be interpreted as hex rather than colour palette index number.

Version: 1.67.2
Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
Date: 2022-05-17T18:23:40.286Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Linux x64 5.10.106-15290-g6e9d70c8a9b4

@s6mike s6mike changed the title Relations colour indexes not working in json config file when colorScheme not default VSCode Extension argdown.config.json: Incorrect syntax errors when using unquoted integers for relationsColors May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant