Skip to content

Commit 545e0dc

Browse files
authored
Add example of syntax highlighting
1 parent 90a3cf1 commit 545e0dc

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

readme.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ One special value, namely `'data*'`, can be used to allow all `data` properties.
143143
Instead of a single string (such as `type`), which allows any [*property
144144
value*][value] of that [*property name*][name], it’s also possible to provide
145145
an array (such as `['type', 'checkbox']`), where the first entry is the
146-
*propery name*, and the other entries are allowed *property values*.
146+
*property name*, and all other entries allowed *property values*.
147147

148148
This is how the default GitHub schema allows only disabled checkbox inputs:
149149

@@ -158,6 +158,20 @@ This is how the default GitHub schema allows only disabled checkbox inputs:
158158
}
159159
```
160160

161+
This also plays well with properties that accept space- or comma-separated
162+
values, such as `class`.
163+
Say you wanted to allow certain classes on `span` elements for syntax
164+
highlighting, that can be done like this:
165+
166+
167+
```js
168+
//
169+
"span": [
170+
["className", "token", "number", "operator"]
171+
],
172+
//
173+
```
174+
161175
###### `required`
162176

163177
Map of tag names to required [*property names*][name] and their default

0 commit comments

Comments
 (0)