File tree Expand file tree Collapse file tree 6 files changed +37
-13
lines changed
changelogs/internal/newsfragments Expand file tree Collapse file tree 6 files changed +37
-13
lines changed Original file line number Diff line number Diff line change @@ -387,6 +387,11 @@ footer {
387
387
border-top : 1px $table-border-color solid ;
388
388
}
389
389
390
+ td > p :last-child {
391
+ // Avoid unnecessary space at the bottom of the cells.
392
+ margin-bottom : 0 ;
393
+ }
394
+
390
395
& .object-table , & .response-table , & .content-type-table {
391
396
border : 1px $table-border-color solid ;
392
397
Original file line number Diff line number Diff line change
1
+ Enforce consistent vertical spacing between paragraphs in endpoint definitions.
Original file line number Diff line number Diff line change 1
- {{ $ver := .v }}
2
- {{ $this := .this }}
1
+ {{ $ver := .v - }}
2
+ {{ $this := .this - }}
3
3
4
4
{{/*
5
5
This differs from the shortcode added-in by wanting to be a block instead of inline
6
6
and by slightly altering the rendered text as a result.
7
7
*/}}
8
8
9
- {{ if $this }}
10
- ** New in this version.**
11
- {{ else }}
12
- ** Added in ` v{{ $ver }}`**
13
- {{ end }}
9
+ {{ if $this - }}
10
+ < p > < strong > New in this version.</ strong > </ p >
11
+ {{ else - }}
12
+ < p > < strong > Added in < code > v{{ $ver }}</ code > </ strong > </ p >
13
+ {{ end - }}
Original file line number Diff line number Diff line change 6
6
version -> details pairs.
7
7
*/ -}}
8
8
{{ range $ver, $details := .changes_dict -}}
9
- < br > < br >
9
+ < p >
10
10
< strong >
11
11
Changed in < code > v{{ $ver }}</ code > :
12
12
</ strong >
13
13
{{ $details | markdownify }}
14
- {{ end }}
14
+ </ p >
15
+ {{ end -}}
Original file line number Diff line number Diff line change 21
21
< tr >
22
22
< td > < code > {{ $mime }}</ code > </ td >
23
23
< td >
24
- {{ $body.schema.description | markdownify -}}
24
+ {{/*
25
+ Force the rendering as a block so the description is always inside a
26
+ paragraph. This allows to always keep the same spacing between paragraphs
27
+ when adding added-in and changed-in paragraphs.
28
+ */}}
29
+ {{ $body.schema.description | page.RenderString (dict "display" "block") -}}
25
30
{{ if (index $body.schema "x-addedInMatrixVersion") }}{{ partial "added-in" (dict "v" (index $body.schema "x-addedInMatrixVersion")) }}{{ end -}}
26
31
{{ if (index $body.schema "x-changedInMatrixVersion") }}{{ partial "changed-in" (dict "changes_dict" (index $body.schema "x-changedInMatrixVersion")) }}{{ end -}}
27
32
</ td >
Original file line number Diff line number Diff line change 306
306
* `x-changedInMatrixVersion`: optional string indicating in which Matrix
307
307
spec version this property was last changed.
308
308
*/}}
309
- {{ define "partials/property-description" }}
310
- {{ if .required }}< strong > Required: </ strong > {{end -}}
311
- {{ .property.description | markdownify -}}
309
+ {{ define "partials/property-description" -}}
310
+ {{ $description := .property.description -}}
311
+ {{ if .required -}}
312
+ {{/*
313
+ Prepend "Required:" to make it part of the first paragraph of the
314
+ description.
315
+ */}}
316
+ {{- $description = printf "< strong > Required: </ strong > %s" $description -}}
317
+ {{ end -}}
318
+ {{/*
319
+ Force the rendering as a block so the description is always inside a
320
+ paragraph. This allows to always keep the same spacing between paragraphs
321
+ when adding added-in and changed-in paragraphs.
322
+ */}}
323
+ {{ $description | page.RenderString (dict "display" "block") -}}
312
324
{{ if .property.enum }}< p > One of: < code > [{{ delimit .property.enum ", " }}]</ code > .</ p > {{ end -}}
313
325
{{ if (index .property "x-addedInMatrixVersion") }}{{ partial "added-in" (dict "v" (index .property "x-addedInMatrixVersion")) }}{{ end -}}
314
326
{{ if (index .property "x-changedInMatrixVersion") }}{{ partial "changed-in" (dict "changes_dict" (index .property "x-changedInMatrixVersion")) }}{{ end -}}
You can’t perform that action at this time.
0 commit comments