@@ -206,7 +206,7 @@ internal void ReadMemberContent(XElement xml, MemberElement member)
206
206
207
207
// ignore unknown elements
208
208
default :
209
- m_Logger . LogWarning ( $ "Encountered unknown element '{ elementName } '. Element will be ignored.") ;
209
+ m_Logger . LogWarning ( $ "Encountered unknown element in member '{ elementName } '. Element will be ignored.") ;
210
210
break ;
211
211
}
212
212
}
@@ -281,6 +281,20 @@ internal TextBlock ReadTextBlock(XElement xml)
281
281
element = new CElement ( elementNode . Value ) ;
282
282
break ;
283
283
284
+ case "b" :
285
+ element = new BoldElement ( ReadTextBlock ( elementNode ) ) ;
286
+ break ;
287
+
288
+ case "a" :
289
+ if ( elementNode . TryGetAttributeValue ( "href" , out var linkHref ) )
290
+ {
291
+ if ( Uri . TryCreate ( linkHref , UriKind . Absolute , out var target ) )
292
+ {
293
+ element = new SeeElement ( target , ReadTextBlock ( elementNode ) ) ;
294
+ }
295
+ }
296
+ break ;
297
+
284
298
case "see" :
285
299
// <see /> allows adding links to the documentation
286
300
//
@@ -313,7 +327,7 @@ internal TextBlock ReadTextBlock(XElement xml)
313
327
314
328
// ignore unknown elements
315
329
default :
316
- m_Logger . LogWarning ( $ "Encountered unknown element '{ elementNode . Name } '. Element will be ignored.") ;
330
+ m_Logger . LogWarning ( $ "Encountered unknown element in text block '{ elementNode . Name } '. Element will be ignored.") ;
317
331
break ;
318
332
}
319
333
break ;
@@ -451,8 +465,8 @@ private static string TrimLines(string content, StringSplitOptions splitOptions,
451
465
if ( lines . Count == 0 )
452
466
return String . Empty ;
453
467
454
- // Indent in generated XML doc files is greater than 4 always.
455
- // This allows us to optimize the case where the author actually placed
468
+ // Indent in generated XML doc files is greater than 4 always.
469
+ // This allows us to optimize the case where the author actually placed
456
470
// whitespace inline in between tags.
457
471
if ( indent <= 4 && ! String . IsNullOrEmpty ( lines [ 0 ] ) && lines [ 0 ] [ 0 ] != '\t ' )
458
472
indent = 0 ;
@@ -477,13 +491,13 @@ private static string TrimLines(string content, StringSplitOptions splitOptions,
477
491
/// </summary>
478
492
private static int ? DetermineIndentation ( string content )
479
493
{
480
- // When inline documentation is written to a XML file by the compiler,
494
+ // When inline documentation is written to a XML file by the compiler,
481
495
// all text is indented by the same number of character:
482
496
//
483
497
// Entire block is indented
484
498
// │
485
- // │ <member name="F:DemoProject.DemoClass.Field1"> Empty leading line
486
- // │ <remarks> <───────┘
499
+ // │ <member name="F:DemoProject.DemoClass.Field1"> Empty leading line
500
+ // │ <remarks> <───────┘
487
501
// └───> Remarks allow specification of more detailed information about a member, in this case a field
488
502
// supplementing the information specified in the summary
489
503
// ┌───> </remarks>
@@ -493,10 +507,10 @@ private static string TrimLines(string content, StringSplitOptions splitOptions,
493
507
// Empty trailing line
494
508
//
495
509
// In order to properly render the documentation, the leading whitespace
496
- // needs to be removed.
497
- //
510
+ // needs to be removed.
511
+ //
498
512
// This methods determines the number of character that have to be removed
499
- // from all lines by
513
+ // from all lines by
500
514
// - removing the first line (probably only whitespace, as can be seen in the example above)
501
515
// - removing the last line (probably only whitespace, as can be seen in the example above)
502
516
// - counting the number of whitespace characters in the first non-whitespace line
@@ -521,9 +535,9 @@ private static string TrimLines(string content, StringSplitOptions splitOptions,
521
535
if ( lines . Count == 0 )
522
536
return null ;
523
537
524
- // The indent of the first line of content determines the base
525
- // indent for all the lines, which we should remove since it's just
526
- // a doc gen artifact.
538
+ // The indent of the first line of content determines the base
539
+ // indent for all the lines, which we should remove since it's just
540
+ // a doc gen artifact.
527
541
return lines [ 0 ] . TakeWhile ( c => Char . IsWhiteSpace ( c ) ) . Count ( ) ;
528
542
529
543
}
0 commit comments