File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/Elastic.Markdown/Myst/Directives/Stepper Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information
44
55using Elastic . Markdown . Helpers ;
6+ using Elastic . Markdown . IO ;
67using Markdig . Syntax ;
78using Markdig . Syntax . Inlines ;
89using Microsoft . AspNetCore . Html ;
@@ -22,10 +23,15 @@ public HtmlString RenderTitle()
2223 {
2324 // Parse the title as markdown with full pipeline (including substitutions)
2425 var directiveBlock = ( DirectiveBlock ) DirectiveBlock ;
26+
27+ // Get the YamlFrontMatter from the original document to support local substitutions
28+ var originalContext = directiveBlock . GetData ( "context" ) as ParserContext ;
29+ var yamlFrontMatter = originalContext ? . YamlFrontMatter ;
30+
2531 var context = new ParserContext ( new ParserState ( directiveBlock . Build )
2632 {
2733 MarkdownSourcePath = directiveBlock . CurrentFile ,
28- YamlFrontMatter = null ,
34+ YamlFrontMatter = yamlFrontMatter ,
2935 DocumentationFileLookup = ( path ) => null ! ,
3036 CrossLinkResolver = null !
3137 } ) ;
You can’t perform that action at this time.
0 commit comments