-
Notifications
You must be signed in to change notification settings - Fork 42
/
Heading.yaml
88 lines (88 loc) · 2.24 KB
/
Heading.yaml
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
title: Heading
'@id': stencila:Heading
extends: Entity
category: prose
description: A heading.
$comment: |
Analogues of `Heading` in other schemas include:
- HTML [`<h1>` to `<h6>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h1)
- JATS XML [`<title>`](https://jats.nlm.nih.gov/archiving/tag-library/1.1/element/title.html)
- Pandoc [`Header`](https://github.com/jgm/pandoc-types/blob/1.17.5.4/Text/Pandoc/Definition.hs#L233)
dom:
derive: false
jats:
elem: title
special: true
html:
special: true
markdown:
derive: false
proptest: {}
required:
- level
- content
core:
- authors
- provenance
properties:
level:
'@id': stencila:level
description: The level of the heading.
type: integer
default: 0
minimum: 0
maximum: 6
patch:
formats: [md]
proptest:
min:
description: Fixed value of 1
value: '1'
low:
description: Generate values between 1 and 6
strategy: 1..=6i64
high:
description: Generate values between 0 and 6
strategy: 0..=6i64
max:
description: Generate an arbitrary value
strategy: i64::arbitrary()
content:
'@id': stencila:content
description: Content of the heading.
type: array
items:
$ref: Inline
proptest:
min:
description: Generate a single arbitrary inline node
strategy: vec_inlines(1)
low:
description: Generate up to two arbitrary inline nodes
strategy: vec_inlines(2)
high:
description: Generate up to four arbitrary inline nodes
strategy: vec_inlines(4)
max:
description: Generate up to eight arbitrary inline nodes without restrictions on their order
strategy: vec(Inline::arbitrary(), size_range(0..=8))
authors:
'@id': schema:author
description: The authors of the heading.
type: array
items:
$ref: Author
strip: [authors]
serde:
deserializeWith: option_one_or_many_string_or_object
dom:
elem: span
provenance:
'@id': stencila:provenance
description: A summary of the provenance of the content within the heading.
type: array
items:
$ref: ProvenanceCount
strip: [provenance]
dom:
elem: span