Skip to content

Commit

Permalink
fix(Variable import and export): Avoid use of common keywords
Browse files Browse the repository at this point in the history
The words `export` and `import` are often language keywords which causes issues for generated code. So change avoids those clashes.
  • Loading branch information
nokome committed Jan 21, 2020
1 parent 4c8be64 commit 8812e01
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions schema/CodeBlock.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ status: stable
category: code
description: A code block.
properties:
export:
'@id': stencila:export
exportFrom:
'@id': stencila:exportFrom
aliases:
- export
description: |
A compilation directive giving the name of the variable to export
into the content of the code block.
type: string
import:
'@id': stencila:import
importTo:
'@id': stencila:importTo
aliases:
- export
description: |
A compilation directive giving the name of the variable to import
the content of the code block as.
Expand Down
12 changes: 8 additions & 4 deletions schema/Link.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ properties:
type: array
items:
$ref: InlineContent
export:
'@id': stencila:export
exportFrom:
'@id': stencila:exportFrom
aliases:
- export
description: |
A compilation directive giving the name of the variable to export
to the link target.
type: string
import:
'@id': stencila:import
importTo:
'@id': stencila:importTo
aliases:
- import
description: |
A compilation directive giving the name of the variable to import
the link target as.
Expand Down

0 comments on commit 8812e01

Please sign in to comment.