@@ -2355,6 +2355,117 @@ public void Preserve_Para()
2355
2355
TestWithStrings ( originalIntellisense , originalDocs , expectedDocs , configuration ) ;
2356
2356
}
2357
2357
2358
+ [ Fact ]
2359
+ public void Convert_NewLines_To_Para ( )
2360
+ {
2361
+ // Convert triple slash new lines to para xml items.
2362
+
2363
+ string originalIntellisense = @"<?xml version=""1.0""?>
2364
+ <doc>
2365
+ <assembly>
2366
+ <name>MyAssembly</name>
2367
+ </assembly>
2368
+ <members>
2369
+ <member name=""T:MyNamespace.MyType"">
2370
+ <summary>I am paragraph one.
2371
+ I am paragraph number two.</summary>
2372
+ <remarks>I have no newlines.</remarks>
2373
+ </member>
2374
+ </members>
2375
+ </doc>" ;
2376
+
2377
+ string originalDocs = @"<Type Name=""MyType"" FullName=""MyNamespace.MyType"">
2378
+ <TypeSignature Language=""DocId"" Value=""T:MyNamespace.MyType"" />
2379
+ <AssemblyInfo>
2380
+ <AssemblyName>MyAssembly</AssemblyName>
2381
+ </AssemblyInfo>
2382
+ <Docs>
2383
+ <summary>To be added.</summary>
2384
+ <remarks>To be added.</remarks>
2385
+ </Docs>
2386
+ <Members></Members>
2387
+ </Type>" ;
2388
+
2389
+ string expectedDocs = @"<Type Name=""MyType"" FullName=""MyNamespace.MyType"">
2390
+ <TypeSignature Language=""DocId"" Value=""T:MyNamespace.MyType"" />
2391
+ <AssemblyInfo>
2392
+ <AssemblyName>MyAssembly</AssemblyName>
2393
+ </AssemblyInfo>
2394
+ <Docs>
2395
+ <summary>
2396
+ <para>I am paragraph one.</para>
2397
+ <para>I am paragraph number two.</para>
2398
+ </summary>
2399
+ <remarks>I have no newlines.</remarks>
2400
+ </Docs>
2401
+ <Members></Members>
2402
+ </Type>" ;
2403
+
2404
+ Configuration configuration = new ( )
2405
+ {
2406
+ MarkdownRemarks = false
2407
+ } ;
2408
+ configuration . IncludedAssemblies . Add ( FileTestData . TestAssembly ) ;
2409
+
2410
+ TestWithStrings ( originalIntellisense , originalDocs , expectedDocs , configuration ) ;
2411
+ }
2412
+
2413
+ [ Fact ]
2414
+ public void Convert_NewLines_To_Para_Preserve_Existing_Para ( )
2415
+ {
2416
+ // Convert triple slash new lines to para xml items. If there are paras too, keep them.
2417
+
2418
+ string originalIntellisense = @"<?xml version=""1.0""?>
2419
+ <doc>
2420
+ <assembly>
2421
+ <name>MyAssembly</name>
2422
+ </assembly>
2423
+ <members>
2424
+ <member name=""T:MyNamespace.MyType"">
2425
+ <summary><para>I am paragraph one.</para>
2426
+ I am paragraph number two.
2427
+ I am paragraph number three.</summary>
2428
+ </member>
2429
+ </members>
2430
+ </doc>" ;
2431
+
2432
+ string originalDocs = @"<Type Name=""MyType"" FullName=""MyNamespace.MyType"">
2433
+ <TypeSignature Language=""DocId"" Value=""T:MyNamespace.MyType"" />
2434
+ <AssemblyInfo>
2435
+ <AssemblyName>MyAssembly</AssemblyName>
2436
+ </AssemblyInfo>
2437
+ <Docs>
2438
+ <summary>To be added.</summary>
2439
+ <remarks>To be added.</remarks>
2440
+ </Docs>
2441
+ <Members></Members>
2442
+ </Type>" ;
2443
+
2444
+ string expectedDocs = @"<Type Name=""MyType"" FullName=""MyNamespace.MyType"">
2445
+ <TypeSignature Language=""DocId"" Value=""T:MyNamespace.MyType"" />
2446
+ <AssemblyInfo>
2447
+ <AssemblyName>MyAssembly</AssemblyName>
2448
+ </AssemblyInfo>
2449
+ <Docs>
2450
+ <summary>
2451
+ <para>I am paragraph one.</para>
2452
+ <para>I am paragraph number two.</para>
2453
+ <para>I am paragraph number three.</para>
2454
+ </summary>
2455
+ <remarks>To be added.</remarks>
2456
+ </Docs>
2457
+ <Members></Members>
2458
+ </Type>" ;
2459
+
2460
+ Configuration configuration = new ( )
2461
+ {
2462
+ MarkdownRemarks = true
2463
+ } ;
2464
+ configuration . IncludedAssemblies . Add ( FileTestData . TestAssembly ) ;
2465
+
2466
+ TestWithStrings ( originalIntellisense , originalDocs , expectedDocs , configuration ) ;
2467
+ }
2468
+
2358
2469
private static void TestWithStrings ( string intellisenseFile , string originalDocsFile , string expectedDocsFile , Configuration configuration ) =>
2359
2470
TestWithStrings ( intellisenseFile , new List < StringTestData > ( ) { new StringTestData ( originalDocsFile , expectedDocsFile ) } , configuration ) ;
2360
2471
0 commit comments