mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 06:38:00 +00:00
Fix standalone HTML and LaTeX exports
This commit is contained in:
1 parent
c95cc5bacc
commit
a1d8169284
3 files changed
+71
-3
No files matched your search
@@ -732,7 +732,13 @@ public partial class ContentBlockComponent : MSGComponentBase
|
||||
// here which would fall out of sync with the one in FileExportFormatExtensions.
|
||||
//
|
||||
if (format.UsesPandoc())
|
||||
await PandocExport.ToDocument(this.RustService, this.PandocAvailability, this.EffectiveExportTitle, format, this.Content);
|
||||
{
|
||||
if (this.Content.TryGetMarkdownText(out var originalMarkdown) &&
|
||||
PlainFileExport.TryExtractStandaloneSource(originalMarkdown, format, out var source))
|
||||
await PlainFileExport.ToSourceFile(this.RustService, this.EffectiveExportTitle, format, source);
|
||||
else
|
||||
await PandocExport.ToDocument(this.RustService, this.PandocAvailability, this.EffectiveExportTitle, format, this.Content);
|
||||
}
|
||||
else if (this.Content.TryGetExportMarkdown(out var markdown))
|
||||
await PlainFileExport.ToFile(this.RustService, this.EffectiveExportTitle, format, markdown);
|
||||
}
|
||||
@@ -852,4 +858,4 @@ public partial class ContentBlockComponent : MSGComponentBase
|
||||
|
||||
await this.DisposeMathContainerIfNeededAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user