Skip to content

Commit a3ca124

Browse files
committed
children: multi-line description does not look nice #1213
1 parent c5eb975 commit a3ca124

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

assets/css/theme.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,13 @@ p:empty {
957957
padding-top: 0;
958958
}
959959

960+
.children-type-group p + p,
961+
.children-type-tree p + p,
962+
.children-type-flat p + p,
963+
.children-type-list p + p {
964+
margin-top: 0.125em;
965+
}
966+
960967
.children-type-flat,
961968
.children-type-list {
962969
list-style: none;

docs/content/shortcodes/children/test.en.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
description: |
3-
This is a plain page test, and the beginning of a YAML multiline description...
3+
This is a plain page test, and the beginning of a YAML multiline description with...
4+
5+
multiple paragraphs
46
tags:
57
- "Children"
68
title: "page X"

docs/content/shortcodes/children/test.pir.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
description: |
3-
This be a plain plank test, an' th' beginn'n o' a YAML multiline description…
3+
This is a plain page test, and the beginning of a YAML multiline description with...
4+
5+
multiple paragraphs
46
tags:
57
- "Children"
68
title: "plank X"

layouts/partials/shortcodes/children.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@
107107
{{- if $.withDescription }}
108108
{{- $description := trim (or $page.Description $page.Summary | plainify | htmlUnescape) "\n\r\t " }}
109109
{{- with $description }}
110+
{{- $text := replace (replace . "\r\n" "\n") "\n" (printf "\n%s " $indent) }}
110111

111-
{{ $indent }} {{ . }}
112+
{{ $indent }} {{ $text }}
112113
{{- end }}
113114
{{- end }}
114115
{{- end }}

layouts/partials/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9.0.3+bf3dbc8308313d6dd1f7ad32ba2a7983a4e9b3e5
1+
9.0.3+c5eb975e9e845f67c9dd1cf02374d19a51a8fe03

0 commit comments

Comments
 (0)