@@ -9,6 +9,8 @@ namespace Elastic.Markdown.Myst.Directives;
99public class IncludeBlock ( DirectiveBlockParser parser , Dictionary < string , string > properties , ParserContext context )
1010 : DirectiveBlock ( parser , properties )
1111{
12+ public override string Directive => "include" ;
13+
1214 public BuildContext Build { get ; } = context . Build ;
1315
1416 public IFileSystem FileSystem { get ; } = context . Build . ReadFileSystem ;
@@ -21,8 +23,6 @@ public class IncludeBlock(DirectiveBlockParser parser, Dictionary<string, string
2123
2224 public bool Found { get ; private set ; }
2325
24- protected virtual string Directive { get ; } = "include" ;
25-
2626 public bool Literal { get ; protected set ; }
2727 public string ? Language { get ; private set ; }
2828 public string ? Caption { get ; private set ; }
@@ -54,7 +54,7 @@ public override void FinalizeAndValidate(ParserContext context)
5454 if ( FileSystem . File . Exists ( IncludePath ) )
5555 Found = true ;
5656 else
57- context . EmitError ( Line , Column , "```{include}" . Length , $ "`{ IncludePath } ` does not exist.") ;
57+ EmitError ( context , $ "`{ IncludePath } ` does not exist.") ;
5858
5959
6060 }
@@ -66,5 +66,6 @@ public class LiteralIncludeBlock : IncludeBlock
6666 public LiteralIncludeBlock ( DirectiveBlockParser parser , Dictionary < string , string > properties , ParserContext context )
6767 : base ( parser , properties , context ) => Literal = true ;
6868
69- protected override string Directive { get ; } = "literalinclude" ;
69+ public override string Directive => "literalinclude" ;
70+
7071}
0 commit comments