Use single string for command arguments
We changed `code.cpp.cxxflags` and `editor.args` from array of string to a single string. If you upgraded from an older version, you will see error like this:
FATA unmarshal config failed: 2 error(s) decoding:
* 'code.cpp.cxxflags' expected type 'string', got unconvertible type '[]interface {}', value: '[-O2 -std=c++17]'
* 'editor.args' expected type 'string', got unconvertible type '[]interface {}', value: '[]'
You can manually fix this by changing `code.cpp.cxxflags` and `editor.args` to a signle string in `~/.config/leetgo/config.yaml`, or you can use
`leetgo init -f -t cn` to regenerate the global configuration.
Must specify opening files in custom editor arguments
For example:
yaml
editor:
use: custom
command: subl.exe
args: ""
In previous version, `leetgo` will open the generated code file using `subl.exe`. But in 1.0, you must specify which file to open, you can use
`{{.CodeFile}}`, `{{.TestFile}}`, `{{.DescriptionFile}}` or `{{.TestCasesFile}}` in `args` to open the specific file. Additionly, you can use `{{.Files}}` to open all generated files.
yaml
editor:
use: custom
command: subl.exe
args: "{{.Files}}"
Changelog
Features
* bb8469a3f84bcadd502d1d59467556208815c610: feat: support float result compare (177) (j178)
* 67e8f2d169f33b9ba5e7be2b79ebef7ce59f6385: feat: enhanced judger (178) (j178)
* c749bf7cfc9282d294c6470c0d13fdb080c07365: feat: make `editor.args` and `code.cpp.cxxflags` single string (174) (j178)
Bug fixes
* 816f307d82e5d82690b29a7bdae0dcbceb67f570: fix: handle files ends with \r\n on Windows (j178)
* c6487bc8f7894e7ddb60e2de94c4dcdc53bc50ec: fix: detect question editor type (j178)
* a74997a0885af91a38bbe5973235cd2d5ba4bd65: fix: add editorType when requesting questionData (j178)
* f677811ed491c0c7b0053763bad64eaf6c9ba1de: fix: remove timeout from leetgo fix (j178)
* 1956d6c67bdae7ea637f33505a3a91f65f0582ba: fix(rust): add return type conversion (176) (j178)
* a31ff86be26ad30b9e85d38a4d2428e59f289dda: fix: manually fix some metadata (170) (j178)
Others
* dba162f3f9dde75abc878f9d95e59af13467889d: chore(rust): bump version (j178)
* cfe6444ac07aa9d7c20255d541e210aa0d5bd0c2: chore: add more sub/super script letters (j178)
* 72b14e2466620783b22e630b6fb22bc5576a0d06: chore: cleanup (j178)
* a0b7239b67bd3296b357a2c8a06169d17263ff6c: chore(deps): bump github.com/j178/leetgo/testutils/go (180) (dependabot[bot])
* 084cf6e2c246a1eb0c51035d3131d1cc144e3fa2: chore(deps): bump github.com/charmbracelet/bubbletea (183) (dependabot[bot])
* 4fce0e67f3cb1f10a0652617233e96b986ac7ced: chore(deps): bump github.com/charmbracelet/log from 0.2.1 to 0.2.2 (182) (dependabot[bot])
* d5f6d755c41a0878c955bbcb55b6c40b26760995: chore(deps): bump github.com/zalando/go-keyring from 0.2.2 to 0.2.3 (179) (dependabot[bot])
* 303c1df5752fa5a73e3efb60a54a47fc0f60dcdd: chore(deps): bump github.com/pelletier/go-toml/v2 from 2.0.7 to 2.0.8 (181) (dependabot[bot])
* abb3045e983e707680094121b3f08372fe74a404: chore: tweak config comments (j178)