Rickaym / manim-sideview

A Manim utility extension for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=Rickaym.manim-sideview
MIT License
101 stars 11 forks source link

Commented out lines in manim.cfg are not discarded #79

Closed henrikmidtiby closed 8 months ago

henrikmidtiby commented 8 months ago

There seems to be an issue with the configuration parser of manim-sideview. During development of an animation, my manim.cfg file looked like this. This worked fine.

[CLI]
#quality = production_quality
quality = low_quality

When I afterwards wanted to change the quality settings to production_quality, the preview kept showing the low quality version of the rendered file. At this point the configuration file looked like this.

[CLI]
quality = production_quality
#quality = low_quality

To fix the issue, I had to ensure that the active line in the config file was at the end of the file.

[CLI]
#quality = low_quality
quality = production_quality

I think that the issue is with the configuration parser (master/src/configParser.ts), as it does look for comments (lines starting with #) in the config file.

lbirkert commented 8 months ago

A solution would be to switch to a proper TOML parser which supports the entire standard instead of our minimal implementation.

https://www.npmjs.com/package/toml