From 8a4b10363a6354718a60b298697748b4c088adf3 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Tue, 24 Oct 2023 21:12:13 +0300 Subject: [PATCH] Missing space before tsdoc tags (#88) Fix #85 (cherry picked from commit e9bc9031731489fc910d7ba203bdec8a53381e9e) --- .../java/com/vertispan/tsdefs/doclet/TsDocTreeVisitor.java | 2 +- .../tsdocs/doclet/links/methods/JsTypeLinksMethods.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/jsinterop-ts-defs-doclet/src/main/java/com/vertispan/tsdefs/doclet/TsDocTreeVisitor.java b/jsinterop-ts-defs-doclet/src/main/java/com/vertispan/tsdefs/doclet/TsDocTreeVisitor.java index 30ef5d7..de8c21b 100644 --- a/jsinterop-ts-defs-doclet/src/main/java/com/vertispan/tsdefs/doclet/TsDocTreeVisitor.java +++ b/jsinterop-ts-defs-doclet/src/main/java/com/vertispan/tsdefs/doclet/TsDocTreeVisitor.java @@ -125,7 +125,7 @@ public String visitDocComment(DocCommentTree node, Element element) { .collect(Collectors.joining()); String tags = node.getBlockTags().stream() - .map(tag -> tag.accept(this, element)) + .map(tag -> " " + tag.accept(this, element)) .collect(Collectors.joining("\n")); return body + "\n" + tags; } diff --git a/jsinterop-ts-defs-doclet/src/test/java/com/vertispan/tsdefs/tests/tsdocs/doclet/links/methods/JsTypeLinksMethods.java b/jsinterop-ts-defs-doclet/src/test/java/com/vertispan/tsdefs/tests/tsdocs/doclet/links/methods/JsTypeLinksMethods.java index ad3bded..558bf50 100644 --- a/jsinterop-ts-defs-doclet/src/test/java/com/vertispan/tsdefs/tests/tsdocs/doclet/links/methods/JsTypeLinksMethods.java +++ b/jsinterop-ts-defs-doclet/src/test/java/com/vertispan/tsdefs/tests/tsdocs/doclet/links/methods/JsTypeLinksMethods.java @@ -57,7 +57,11 @@ */ @JsType public class JsTypeLinksMethods { - public void doSomethingA() {} + + /** @return string sample */ + public String doSomethingA() { + return ""; + } public void doSomethingA2() {} }