Skip to content

Commit

Permalink
Nix language primitives are luckily the same as in JSON
Browse files Browse the repository at this point in the history
fixes #68
  • Loading branch information
garbas committed Jun 11, 2020
1 parent 007eee1 commit 60ea969
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/import-channel
Expand Up @@ -386,15 +386,14 @@ def get_options(evaluation):
for name, option in options:
default = option.get("default")
if default is not None:
default = str(default)

default = json.dumps(default)

example = option.get("example")
if example is not None:
if (type(example) == dict and example.get("_type") == "literalExample"):
example = str(example["text"])
example = json.dumps(example["text"])
else:
example = str(example)
example = json.dumps(example)

description = option.get("description")
if description is not None:
Expand Down

0 comments on commit 60ea969

Please sign in to comment.