Skip to content

Commit

Permalink
fix(TableCell): Relax content to allow any Node
Browse files Browse the repository at this point in the history
This is consistent with `ListItem.content`.
  • Loading branch information
nokome committed Jan 21, 2020
1 parent e62ea86 commit f048dbb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions py/stencila/schema/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2237,15 +2237,15 @@ def __init__(
class TableCell(Entity):
"""A cell within a `Table`."""

content: Array["BlockContent"]
content: Array["Node"]
cellType: Optional["ECellType"] = None
colspan: Optional[int] = None
name: Optional[str] = None
rowspan: Optional[int] = None

def __init__(
self,
content: Array["BlockContent"],
content: Array["Node"],
cellType: Optional["ECellType"] = None,
colspan: Optional[int] = None,
id: Optional[str] = None,
Expand Down
2 changes: 1 addition & 1 deletion r/R/types.R
Original file line number Diff line number Diff line change
Expand Up @@ -2728,7 +2728,7 @@ TableCell <- function(
meta = meta
)
self$type <- as_scalar("TableCell")
self[["content"]] <- check_property("TableCell", "content", TRUE, missing(content), Array(BlockContent), content)
self[["content"]] <- check_property("TableCell", "content", TRUE, missing(content), Array(Node), content)
self[["cellType"]] <- check_property("TableCell", "cellType", FALSE, missing(cellType), Enum("data", "header"), cellType)
self[["colspan"]] <- check_property("TableCell", "colspan", FALSE, missing(colspan), "numeric", colspan)
self[["name"]] <- check_property("TableCell", "name", FALSE, missing(name), "character", name)
Expand Down
2 changes: 1 addition & 1 deletion schema/TableCell.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ properties:
description: Contents of the table cell.
type: array
items:
$ref: BlockContent
$ref: Node
required:
- content

0 comments on commit f048dbb

Please sign in to comment.