Skip to content

Commit 87b7b15

Browse files
author
Chase Coalwell
committed
escape multi-line comment close tag
1 parent eff63bf commit 87b7b15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptWriter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ TypeScriptWriter writeDocs(Runnable runnable) {
189189
*/
190190
public TypeScriptWriter writeDocs(String docs) {
191191
// Docs can have valid $ characters that shouldn't run through formatters.
192-
writeDocs(() -> write(docs.replace("$", "$$")));
192+
// Escapes multi-line comment closings.
193+
writeDocs(() -> write(docs.replace("$", "$$").replace("*/", "*\\/")));
193194
return this;
194195
}
195196

0 commit comments

Comments
 (0)