Skip to content

Commit e3d6c13

Browse files
committed
Optimize imports
1 parent 66c725d commit e3d6c13

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Elastic.Markdown/Myst/Renderers/LlmMarkdown/LlmBlockRenderers.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Markdig.Extensions.Yaml;
1616
using Markdig.Renderers;
1717
using Markdig.Syntax;
18+
using Markdig.Syntax.Inlines;
1819
using CodeBlock = Markdig.Syntax.CodeBlock;
1920

2021
namespace Elastic.Markdown.Myst.Renderers.LlmMarkdown;
@@ -104,7 +105,7 @@ private static string ExtractHeadingText(HeadingBlock heading)
104105
if (heading.Inline == null)
105106
return string.Empty;
106107
return heading.Inline.Descendants()
107-
.OfType<Markdig.Syntax.Inlines.LiteralInline>()
108+
.OfType<LiteralInline>()
108109
.Select(l => l.Content.ToString())
109110
.Aggregate(string.Empty, (current, text) => current + text);
110111
}
@@ -306,7 +307,7 @@ protected override void Write(LlmMarkdownRenderer renderer, Table table)
306307
BuildContext = renderer.BuildContext
307308
};
308309
// Render cell content to temporary writer
309-
foreach (var inline in cell.Descendants().OfType<Markdig.Syntax.Inlines.Inline>())
310+
foreach (var inline in cell.Descendants().OfType<Inline>())
310311
tempRenderer.Write(inline);
311312

312313
// Write padded content
@@ -345,7 +346,7 @@ protected override void Write(LlmMarkdownRenderer renderer, Table table)
345346
BuildContext = renderer.BuildContext
346347
};
347348
// Render cell content to temporary writer
348-
foreach (var inline in cell.Descendants().OfType<Markdig.Syntax.Inlines.Inline>())
349+
foreach (var inline in cell.Descendants().OfType<Inline>())
349350
tempRenderer.Write(inline);
350351

351352
// Write padded content
@@ -385,7 +386,7 @@ private static int[] CalculateColumnWidths(LlmMarkdownRenderer renderer, Table t
385386
BuildContext = renderer.BuildContext
386387
};
387388
// Render cell content to temporary writer
388-
foreach (var inline in cell.Descendants().OfType<Markdig.Syntax.Inlines.Inline>())
389+
foreach (var inline in cell.Descendants().OfType<Inline>())
389390
{
390391
tempRenderer.Write(inline);
391392
}

src/Elastic.Markdown/Myst/Renderers/LlmMarkdown/LlmMarkdownRenderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public LlmMarkdownRenderer(TextWriter writer) : base(writer)
7171

7272
// Add custom renderers for your MyST extensions
7373
ObjectRenderers.Add(new LlmDirectiveRenderer());
74-
ObjectRenderers.Add(new LlmMarkdown.LlmEnhancedCodeBlockRenderer());
74+
ObjectRenderers.Add(new LlmEnhancedCodeBlockRenderer());
7575

7676
// Add default object renderers for CommonMark elements
7777
ObjectRenderers.Add(new LlmHeadingRenderer());

0 commit comments

Comments
 (0)