api_docs: Add line break before return value description text.

Adds a line break before the descriptive text for return
values and events in the api documentation in order to
help with readability of descriptions with multiple
paragraphs of descriptive text.

Adjustments made to the CSS of list items in unordered
lists to visually group the first paragraph of text
to any following paragraphs or unordered lists.
This commit is contained in:
Lauryn Menard 2022-01-21 15:02:12 +01:00 committed by Tim Abbott
parent c6b372b471
commit e479acc809
2 changed files with 13 additions and 3 deletions

View File

@ -171,7 +171,15 @@
}
& > li {
margin: 5px 0;
margin: 5px 0 10px;
& > p {
margin: 0 0 5px;
}
& > p:first-child {
margin: 0;
}
}
}

View File

@ -92,7 +92,8 @@ class APIReturnValuesTablePreprocessor(Preprocessor):
+ ": "
+ '<span class="api-field-type">'
+ data_type
+ "</span> "
+ "</span>\n\n"
+ (spacing + 4) * " "
+ key_description
)
return (
@ -102,7 +103,8 @@ class APIReturnValuesTablePreprocessor(Preprocessor):
+ "`: "
+ '<span class="api-field-type">'
+ data_type
+ "</span> "
+ "</span>\n\n"
+ (spacing + 4) * " "
+ description
)