-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathblocks.schema.toml
128 lines (111 loc) · 3.64 KB
/
blocks.schema.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Schema for blocks.toml
#
# This describes what properties blocks can have, as mentioned in docs/Blocks.md
[block-name]
# Whether this block is deprecated or not.
# Deprecated blocks should be clearly marked as such, and
# should not be actively recommended to users.
#
# If this is set, then the deprecation-message in the corresponding
# language file should be populated.
#
# type: bool, optional
deprecated = false
# What aliases (if any) this block accepts, in addition to its name.
# Case-insensitive.
#
# type: string[], optional
aliases = ["a", "anchor"]
# Whether to exclude the block's name from its list of aliases.
# By default, the block's rule name is, by convention, one of its
# block names when parsing. However this is not always true.
#
# type: bool, optional
exclude-name = false
# Whether this block accepts the star (*) flag.
#
# type: bool, optional
accepts-star = false
# Whether this block accepts the score (_) flag.
#
# type: bool, optional
accepts-score = true
# Whether this block accepts newline delimition for its sections.
#
# type: bool, optional
accepts-newlines = true
# What kind of head this block expects.
# See the document "Blocks.md" for more information.
#
# type: string, enum
# values: "none", "value", "map", "value+map"
head = "map"
# What kind of body this block expects, if any.
#
# type: string, enum
# values: "none", "raw", "elements", "other"
body = "elements"
# Whether this block accepts safe HTML attributes as arguments.
# These are then ported to the final HTML element in rendering,
# with possible changes for safety or correctness.
#
# Only applies to blocks that have head = "map" or "value+map".
#
# type: bool, optional
html-attributes = true
# What kind of HTML output this block produces.
#
# This field is formatted a bit particularly:
#
# "none"
# -> No output.
# "html,$element[,$class]"
# -> This produces a DOM element of the given type. For instance, "html,iframe"
# If the third element is specified, then it ensures that this element has
# the given class added. "html,div,test" means that '<div class="test">' is produced.
# "css"
# -> This modifies the page's CSS rules in some way.
# "other"
# -> This produces some other kind of output that does not fit in the above.
# Because it is not "none" it produces some DOM elements, but it cannot be readily
# described, perhaps because it is context-sensitive or variable.
html-output = "html,span"
# Whether this block has behavior that needs special handling logic.
# The value describes the kind of behavior to expect, and code
# should look for this flag rather than hardcoding based on block name.
#
# type: string, enum, optional
# values: "", "module", "include-elements", "include-messy"
special = ""
# Each argument that this block accepts gets its own sub-key.
# Case-insensitive.
#
# For instance, "collapsible.arguments.hideLocation".
[block-name.arguments.argument-name]
# The high-level type of this argument.
# If it ends in "[]", then it is a list of that kind.
#
# type: string
# values: "string", "int", "float", "bool"
type = "string"
# What values this can argument can take, if it's an enum.
# If this field is excluded, then the argument can take any value.
#
# type: $argument_type[], optional
enum = [
"top",
"bottom",
"both",
"neither",
]
# What the maximum and minimum bounds this argument can take, if it's a numerical value.
# If one or both of these fields are excluded, then there is no upper limit.
#
# type: $argument_type, optional
min-value = 0
max-value = 500
# What value this argument has by default, if not excluded.
# Implies that the argument is optional.
#
# type: $argument_type, optional
default = "both"