-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Code): Refactor code related classes
This makes breaking changes to the code related nodes: - refactor `Code` to be a class for all code related classes without the bloat previously associated with using `SoftwareSourceCode` (previously used for `CodeExpr` and `CodeChunk`) - add a `CodeFragment` type for inline code (using `Code` as a base class and for inline code caused issues with type maps) - rename `CodeExpr` to `CodeExpression` for consistency with full-word-ness of `CodeFragment` Closes #92
- Loading branch information
Showing
7 changed files
with
45 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
schema/CodeExpr.schema.yaml → schema/CodeExpression.schema.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
title: CodeExpr | ||
'@id': stencila:CodeExpr | ||
extends: SoftwareSourceCode | ||
title: CodeExpression | ||
'@id': stencila:CodeExpression | ||
extends: CodeFragment | ||
role: secondary | ||
status: unstable | ||
status: stable | ||
category: code | ||
description: An expression defined in programming language source code. | ||
properties: | ||
value: | ||
'@id': schema:value | ||
output: | ||
'@id': stencila:output | ||
description: The value of the expression when it was last evaluated. | ||
allOf: | ||
- $ref: Node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
title: CodeFragment | ||
'@id': stencila:CodeFragment | ||
extends: Code | ||
role: secondary | ||
status: stable | ||
category: code | ||
description: Inline code. | ||
properties: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters