Skip to content

Commit add692e

Browse files
committed
Add unit test
1 parent ed11532 commit add692e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

codegen/aws/core/src/test/java/software/amazon/smithy/python/aws/codegen/MarkdownToRstDocConverterTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,13 @@ public void testConvertCommonmarkToRstWithNestedList() {
106106
String result = markdownToRstDocConverter.convertCommonmarkToRst(html);
107107
assertEquals(expected, result.trim());
108108
}
109+
110+
@Test
111+
public void testConvertCommonmarkToRstWithFormatSpecifierCharacters() {
112+
// Test that Smithy format specifier characters ($) are properly escaped and treated as literal text
113+
String html = "<html><body><p>Testing $placeholder_one and $placeholder_two</p></body></html>";
114+
String expected = "Testing $placeholder_one and $placeholder_two";
115+
String result = markdownToRstDocConverter.convertCommonmarkToRst(html);
116+
assertEquals(expected, result.trim());
117+
}
109118
}

0 commit comments

Comments
 (0)