aboutsummaryrefslogtreecommitdiff
path: root/ext/data
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-09-04 12:43:56 -0400
committerGitHub <noreply@github.com>2021-09-04 12:43:56 -0400
commitf68ad1f843607d4ba1ad216fe16305c420cee8d6 (patch)
tree0a1dc9a3d78df62fee501f467dce3277fb5b4f1e /ext/data
parenteb457caea9b3e5484355ffce80edb371d3bf232d (diff)
Structured content data (#1930)
* Add support for structured-content data attributes * Assign dataset properties * Don't remove data-sc attributes * Use helper functions * Update test data
Diffstat (limited to 'ext/data')
-rw-r--r--ext/data/schemas/dictionary-term-bank-v3-schema.json22
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/data/schemas/dictionary-term-bank-v3-schema.json b/ext/data/schemas/dictionary-term-bank-v3-schema.json
index abb4e58f..9898a15e 100644
--- a/ext/data/schemas/dictionary-term-bank-v3-schema.json
+++ b/ext/data/schemas/dictionary-term-bank-v3-schema.json
@@ -28,6 +28,9 @@
"tag": {
"type": "string",
"enum": ["br"]
+ },
+ "data": {
+ "$ref": "#/definitions/structuredContentData"
}
}
},
@@ -45,6 +48,9 @@
},
"content": {
"$ref": "#/definitions/structuredContent"
+ },
+ "data": {
+ "$ref": "#/definitions/structuredContentData"
}
}
},
@@ -63,6 +69,9 @@
"content": {
"$ref": "#/definitions/structuredContent"
},
+ "data": {
+ "$ref": "#/definitions/structuredContentData"
+ },
"colSpan": {
"type": "integer",
"minimum": 1
@@ -91,6 +100,9 @@
"content": {
"$ref": "#/definitions/structuredContent"
},
+ "data": {
+ "$ref": "#/definitions/structuredContentData"
+ },
"style": {
"$ref": "#/definitions/structuredContentStyle"
}
@@ -109,6 +121,9 @@
"type": "string",
"const": "img"
},
+ "data": {
+ "$ref": "#/definitions/structuredContentData"
+ },
"path": {
"type": "string",
"description": "Path to the image file in the archive."
@@ -175,6 +190,13 @@
}
]
},
+ "structuredContentData": {
+ "type": "object",
+ "description": "Generic data attributes that should be added to the element.",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
"structuredContentStyle": {
"type": "object",
"additionalProperties": false,