mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-29 09:47:50 +08:00
generate_descriptor_pages.main.kts: Trim redundant spaces in attribute notes
This commit is contained in:
parent
9b464d9210
commit
c0556f146f
@ -334,7 +334,7 @@ fun StringBuilder.appendAttributeRequirementAndAvailability(attribute: Attribute
|
|||||||
fun StringBuilder.appendAttributeInternalNote(attribute: Attribute) {
|
fun StringBuilder.appendAttributeInternalNote(attribute: Attribute) {
|
||||||
val internalNote = attribute.getOwnOrParentInternalNote() ?: return
|
val internalNote = attribute.getOwnOrParentInternalNote() ?: return
|
||||||
append("**Internal Use Only:** ".indentLines(2))
|
append("**Internal Use Only:** ".indentLines(2))
|
||||||
val noteWithoutLineBreaks = internalNote.replace('\n', ' ')
|
val noteWithoutLineBreaks = internalNote.replace('\n', ' ').trimEnd()
|
||||||
append(noteWithoutLineBreaks)
|
append(noteWithoutLineBreaks)
|
||||||
appendLine()
|
appendLine()
|
||||||
}
|
}
|
||||||
@ -347,7 +347,7 @@ fun StringBuilder.appendAttributeDeprecationInfo(attribute: Attribute) {
|
|||||||
(if (deprecatedSince != null) "**_Deprecated since ${deprecatedSince}_**" else "**_Deprecated_**").indentLines(2)
|
(if (deprecatedSince != null) "**_Deprecated since ${deprecatedSince}_**" else "**_Deprecated_**").indentLines(2)
|
||||||
)
|
)
|
||||||
if (deprecationNote != null) {
|
if (deprecationNote != null) {
|
||||||
val noteWithoutLineBreaks = deprecationNote.replace('\n', ' ')
|
val noteWithoutLineBreaks = deprecationNote.replace('\n', ' ').trimEnd()
|
||||||
append(": $noteWithoutLineBreaks")
|
append(": $noteWithoutLineBreaks")
|
||||||
}
|
}
|
||||||
appendLine()
|
appendLine()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user