@@ -787,20 +787,29 @@ final class LocalSwiftTests: XCTestCase {
787
787
```
788
788
func foo(_ bar: Baz)
789
789
```
790
+
791
+ ---
792
+
790
793
""" )
791
794
XCTAssertEqual ( try ! xmlDocumentationToMarkdown ( """
792
795
<Declaration>func foo() -> <Type>Bar</Type></Declaration>
793
796
""" ) , """
794
797
```
795
798
func foo() -> Bar
796
799
```
800
+
801
+ ---
802
+
797
803
""" )
798
804
XCTAssertEqual ( try ! xmlDocumentationToMarkdown ( """
799
805
<Declaration>func replacingOccurrences<Target, Replacement>(of target: Target, with replacement: Replacement, options: <Type usr= " s:SS " >String</Type>.<Type usr= " s:SS10FoundationE14CompareOptionsa " >CompareOptions</Type> = default, range searchRange: <Type usr= " s:Sn " >Range</Type><<Type usr= " s:SS " >String</Type>.<Type usr= " s:SS5IndexV " >Index</Type>>? = default) -> <Type usr= " s:SS " >String</Type> where Target : <Type usr= " s:Sy " >StringProtocol</Type>, Replacement : <Type usr= " s:Sy " >StringProtocol</Type></Declaration>
800
806
""" ) , """
801
807
```
802
808
func replacingOccurrences<Target, Replacement>(of target: Target, with replacement: Replacement, options: String.CompareOptions = default, range searchRange: Range<String.Index>? = default) -> String where Target : StringProtocol, Replacement : StringProtocol
803
809
```
810
+
811
+ ---
812
+
804
813
""" )
805
814
}
806
815
@@ -811,6 +820,9 @@ final class LocalSwiftTests: XCTestCase {
811
820
```
812
821
var foo
813
822
```
823
+
824
+ ---
825
+
814
826
""" )
815
827
816
828
XCTAssertEqual ( try ! xmlDocumentationToMarkdown ( """
@@ -819,13 +831,19 @@ final class LocalSwiftTests: XCTestCase {
819
831
```
820
832
var foo
821
833
```
834
+
835
+ ---
836
+
822
837
""" )
823
838
XCTAssertEqual ( try ! xmlDocumentationToMarkdown ( """
824
839
<Class><USR>asdf</USR><Declaration>var foo</Declaration><Name>foo</Name></Class>
825
840
""" ) , """
826
841
```
827
842
var foo
828
843
```
844
+
845
+ ---
846
+
829
847
""" )
830
848
831
849
XCTAssertEqual ( try ! xmlDocumentationToMarkdown ( """
@@ -841,6 +859,9 @@ final class LocalSwiftTests: XCTestCase {
841
859
```
842
860
var foo
843
861
```
862
+
863
+ ---
864
+
844
865
""" )
845
866
846
867
XCTAssertEqual ( try ! xmlDocumentationToMarkdown ( """
@@ -970,6 +991,7 @@ final class LocalSwiftTests: XCTestCase {
970
991
struct String
971
992
```
972
993
994
+ ---
973
995
A Unicode s
974
996
975
997
### Discussion
@@ -1135,11 +1157,12 @@ final class LocalSwiftTests: XCTestCase {
1135
1157
}
1136
1158
XCTAssertEqual ( content. kind, . markdown)
1137
1159
XCTAssertEqual ( content. value, """
1138
- # S
1160
+ S
1139
1161
```
1140
1162
struct S
1141
1163
```
1142
1164
1165
+ ---
1143
1166
This is a doc comment for S.
1144
1167
1145
1168
### Discussion
@@ -1186,11 +1209,12 @@ final class LocalSwiftTests: XCTestCase {
1186
1209
}
1187
1210
XCTAssertEqual ( content. kind, . markdown)
1188
1211
XCTAssertEqual ( content. value, ##"""
1189
- # test(\_:\_:)
1212
+ test(\_:\_:)
1190
1213
```
1191
1214
func test(_ a: Int, _ b: Int)
1192
1215
```
1193
1216
1217
+ ---
1194
1218
this is **bold** documentation
1195
1219
"""## )
1196
1220
}
@@ -1210,11 +1234,12 @@ final class LocalSwiftTests: XCTestCase {
1210
1234
}
1211
1235
XCTAssertEqual ( content. kind, . markdown)
1212
1236
XCTAssertEqual ( content. value, ##"""
1213
- # \*%\*(\_:\_:)
1237
+ \*%\*(\_:\_:)
1214
1238
```
1215
1239
func *%* (lhs: String, rhs: String)
1216
1240
```
1217
1241
1242
+ ---
1218
1243
this is *italic* documentation
1219
1244
"""## )
1220
1245
}
0 commit comments