Skip to content

Commit

Permalink
fix: editor args substitute issue
Browse files Browse the repository at this point in the history
  • Loading branch information
j178 committed Jun 15, 2023
1 parent 92f1dd0 commit f07e68c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ func createConfigFiles(dir string) error {
return err
}

tmpl := `# leetgo project level config, global config is at %s
# for more details, please refer to https://github.com/j178/leetgo
tmpl := `# This is the leetgo project level config, global config is at %s
# For more details, please refer to https://github.com/j178/leetgo
language: %s
code:
lang: %s
Expand Down
3 changes: 2 additions & 1 deletion editor/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ func (ed *editor) substituteArgs(result *lang.GenerateResult) ([]string, error)
}

args := make([]string, len(ed.args))
for i, arg := range ed.args {
copy(args, ed.args)
for i, arg := range args {
if !strings.Contains(arg, "{{") {
continue
}
Expand Down

0 comments on commit f07e68c

Please sign in to comment.