Skip to content

Commit b219fc9

Browse files
committed
Add <pre> tag only in case when custom javadoc tags are not used
1 parent cc0edb1 commit b219fc9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/visitor/CgAbstractRenderer.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ import org.utbot.framework.plugin.api.util.isArray
9292
import org.utbot.framework.plugin.api.util.isRefType
9393
import org.utbot.framework.plugin.api.util.longClassId
9494
import org.utbot.framework.plugin.api.util.shortClassId
95+
import org.utbot.summary.UtSummarySettings
9596

9697
internal abstract class CgAbstractRenderer(val context: CgContext, val printer: CgPrinter = CgPrinterImpl()) : CgVisitor<Unit>,
9798
CgPrinter by printer {
@@ -309,7 +310,11 @@ internal abstract class CgAbstractRenderer(val context: CgContext, val printer:
309310
}
310311
override fun visit(element: CgDocPreTagStatement) {
311312
if (element.content.all { it.isEmpty() }) return
313+
// Don't add <pre> tag if custom javadoc tags are used.
314+
val shouldAddPreTag = !UtSummarySettings.USE_CUSTOM_JAVADOC_TAGS
315+
if (shouldAddPreTag) println("<pre>")
312316
for (stmt in element.content) stmt.accept(this)
317+
if (shouldAddPreTag) println("</pre>")
313318
}
314319
override fun visit(element: CgDocCodeStmt) {
315320
if (element.isEmpty()) return

0 commit comments

Comments
 (0)