Skip to content

Commit 61d4812

Browse files
authored
fix: Strip backslash before # in generated docstrings (#677)
1 parent 01a83e6 commit 61d4812

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

codegen/core/src/main/java/software/amazon/smithy/python/codegen/writer/MarkdownConverter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ private static String postProcessPandocOutput(String output) {
170170

171171
// Remove unnecessary backslash escapes that pandoc adds for markdown
172172
// These characters don't need escaping in Python docstrings
173-
// Handles: [ ] ' { } ( ) < > ` @ _ * | ! ~ $
174-
output = output.replaceAll("\\\\([\\[\\]'{}()<>`@_*|!~$])", "$1");
173+
output = output.replaceAll("\\\\([\\[\\]'{}()<>`@_*|!~$#])", "$1");
175174

176175
// Replace <note> and <important> tags with admonitions for mkdocstrings
177176
output = replaceAdmonitionTags(output, "note", "Note");

0 commit comments

Comments
 (0)