mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 01:47:21 +00:00
Highlighted code blocks inside the app (#1153)
This commit is contained in:
1 parent
0b42c0288e
commit
f4a86c2fb8
60 files changed
+2550
-41
No files matched your search
@@ -23,19 +23,6 @@ public abstract class MSGComponentBase : ComponentBase, IDisposable, IAsyncDispo
|
||||
|
||||
private ILanguagePlugin Lang { get; set; } = PluginFactory.BaseLanguage;
|
||||
|
||||
/// <summary>
|
||||
/// How Markdown rendered by this component looks: its code blocks follow the color theme of the app.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Every component which renders Markdown wants the same, so it is written down once here instead
|
||||
/// of in each of them. Read on every render: a change of the color theme renders every component
|
||||
/// again, cf. ProcessMessage, and the code blocks change along with it.
|
||||
/// </remarks>
|
||||
protected MudMarkdownStyling MarkdownStyling => new()
|
||||
{
|
||||
CodeBlock = { Theme = this.SettingsManager.IsDarkMode ? CodeBlockTheme.Dark : CodeBlockTheme.Default },
|
||||
};
|
||||
|
||||
#region Overrides of ComponentBase
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
|
||||
Reference in new issue
Block a user