forked from loafle/openapi-generator-original
Confluence Wiki - Escape special characters (#11786)
The Confluence Markup needs to escape some characters.
This commit is contained in:
@@ -148,7 +148,11 @@ public class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConf
|
||||
}
|
||||
|
||||
// chomp tailing newline because it breaks the tables and keep all other sign to show documentation properly
|
||||
return StringUtils.chomp(input);
|
||||
return StringUtils.chomp(input.replace("\\", "\\\\")
|
||||
.replace("{", "\\{").replace("}", "\\}")
|
||||
.replace("]", "\\]")
|
||||
.replace("|", "\\|")
|
||||
.replace("!", "\\!"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user