Skip to content

Commit

Permalink
fix: add newlines in type docs
Browse files Browse the repository at this point in the history
This adds newlines where they've been used in the declaration of a struct (or other type) when one tries to show documentation for the type.
  • Loading branch information
GoNZooo authored and obiwan87 committed Dec 28, 2024
1 parent c5da0ff commit 879dc05
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class OdinDocumentationProvider extends AbstractDocumentationProvider {
if (declaredType instanceof OdinProcedureLiteralType procedureLiteralType) {
declarationText += procedureLiteralType.getProcedureDefinition().getProcedureSignature().getText();
} else if (declaredType != null) {
declarationText += declaredType.getText();
declarationText += declaredType.getText().replaceAll("\n", "\n\n");
} else if (declaration instanceof OdinConstantInitDeclaration constantInitializationStatement) {
int index = constantInitializationStatement.getDeclaredIdentifiers().indexOf(declaredIdentifier);
OdinExpression odinExpression = constantInitializationStatement.getExpressionList().get(index);
Expand Down

0 comments on commit 879dc05

Please sign in to comment.