generate_descriptor_pages.main.kts: Fix rendering deprecated attribute information

This commit is contained in:
Karol Lewandowski 2024-11-22 08:42:45 +01:00
parent a0576f3061
commit 9d4fd6197b
2 changed files with 6 additions and 7 deletions

View File

@ -314,17 +314,15 @@ fun StringBuilder.appendAttributeDeprecationInfo(attribute: Attribute) {
val deprecatedSince = attribute.deprecatedSince val deprecatedSince = attribute.deprecatedSince
val deprecationNote = attribute.deprecationNote val deprecationNote = attribute.deprecationNote
if (deprecatedSince != null || deprecationNote != null) { if (deprecatedSince != null || deprecationNote != null) {
if (deprecatedSince != null) { append(
append("**_Deprecated since ${deprecatedSince}_**".indentLines(4)) (if (deprecatedSince != null) "**_Deprecated since ${deprecatedSince}_**" else "**_Deprecated_**").indentLines(2)
} else { )
append("**_Deprecated_**")
}
if (deprecationNote != null) { if (deprecationNote != null) {
val noteWithoutLineBreaks = deprecationNote.replace('\n', ' ') val noteWithoutLineBreaks = deprecationNote.replace('\n', ' ')
append(": $noteWithoutLineBreaks") append(": $noteWithoutLineBreaks")
} }
appendLine()
} }
append("")
} }
fun StringBuilder.appendChildren(parent: Element, parentPath: String) { fun StringBuilder.appendChildren(parent: Element, parentPath: String) {

View File

@ -1179,7 +1179,8 @@ Attributes
- `ref` _(**required**)_<br/> - `ref` _(**required**)_<br/>
The ID of the action to add to a group. The ID of the action to add to a group.
- `id` _(optional)_<br/> - `id` _(optional)_<br/>
**_Deprecated_**: Use `ref` instead. **_Deprecated_**: Use `ref` instead.
The ID of the action to add to a group. The ID of the action to add to a group.
Children Children