Skip to content

Commit

Permalink
Uplift "json-ld" and "turtle" examples
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Aug 9, 2023
1 parent 39c55ae commit a192ecd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ogc/bblocks/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,9 @@ def validate_test_resources(bblock: BuildingBlock,
add_snippets_formats = [add_snippets_formats]
elif not add_snippets_formats:
add_snippets_formats = []
if code and lang in ('json', 'jsonld', 'ttl'):
fn = bblock.files_path / f"example_{example_id + 1}_{snippet_id + 1}.{snippet['language']}"
if code and lang in ('json', 'jsonld', 'ttl', 'json-ld', 'turtle'):
fn = bblock.files_path / (f"example_{example_id + 1}_{snippet_id + 1}"
f".{FORMAT_ALIASES.get(snippet['language'], snippet['language'])}")
output_fn = output_dir / fn.name

with open(output_fn, 'w') as f:
Expand Down

0 comments on commit a192ecd

Please sign in to comment.