@@ -14,32 +14,24 @@ public static class ProcessorDiagnosticExtensions
1414{
1515 private static string CreateExceptionMessage ( string message , Exception ? e ) => message + ( e != null ? Environment . NewLine + e : string . Empty ) ;
1616
17- public static void EmitError ( this InlineProcessor processor , int line , int column , int length , string message )
18- {
19- var context = processor . GetContext ( ) ;
20- if ( context . SkipValidation )
21- return ;
22- var d = new Diagnostic
23- {
24- Severity = Severity . Error ,
25- File = processor . GetContext ( ) . MarkdownSourcePath . FullName ,
26- Column = column ,
27- Line = line ,
28- Message = message ,
29- Length = length
30- } ;
31- context . Build . Collector . Write ( d ) ;
32- }
17+ public static void EmitError ( this InlineProcessor processor , int line , int column , int length , string message ) =>
18+ processor . Emit ( Severity . Error , line , column , length , message ) ;
3319
3420
35- public static void EmitWarning ( this InlineProcessor processor , int line , int column , int length , string message )
21+ public static void EmitWarning ( this InlineProcessor processor , int line , int column , int length , string message ) =>
22+ processor . Emit ( Severity . Warning , line , column , length , message ) ;
23+
24+ public static void EmitHint ( this InlineProcessor processor , int line , int column , int length , string message ) =>
25+ processor . Emit ( Severity . Hint , line , column , length , message ) ;
26+
27+ public static void Emit ( this InlineProcessor processor , Severity severity , int line , int column , int length , string message )
3628 {
3729 var context = processor . GetContext ( ) ;
3830 if ( context . SkipValidation )
3931 return ;
4032 var d = new Diagnostic
4133 {
42- Severity = Severity . Warning ,
34+ Severity = severity ,
4335 File = processor . GetContext ( ) . MarkdownSourcePath . FullName ,
4436 Column = column ,
4537 Line = line ,
0 commit comments