Skip to content

Empty tableCell not valid #17

@baka0815

Description

@baka0815

Given the following input:

<table><tr><td></td></tr></table>

the generated JSON is:

{
	"version": 1,
	"type": "doc",
	"content": [
		{
			"type": "table",
			"content": [
				{
					"type": "tableRow",
					"content": [
						{
							"type": "tableCell"
						}
					]
				}
			]
		}
	]
}

But an empty table cell is not valid (see https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/table_cell/), it needs a content.
The content itself could be an empty paragraph, so the result should be:

{
	"version": 1,
	"type": "doc",
	"content": [
		{
			"type": "table",
			"content": [
				{
					"type": "tableRow",
					"content": [
						{
							"type": "tableCell",
							"content": [
								{
									"type": "paragraph"
								}
							]
						}
					]
				}
			]
		}
	]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions