[frontend/mfm] Make codeblocks in MfM scroll horizontally
This commit is contained in:
parent
44e1c9d5e7
commit
5b1ab95b8c
2 changed files with 7 additions and 0 deletions
|
@ -85,3 +85,9 @@
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::deep {
|
||||||
|
.code-pre {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
}
|
|
@ -110,6 +110,7 @@ public static class MfmRenderer
|
||||||
private static INode MfmCodeBlockNode(MfmNodeTypes.MfmCodeBlockNode node, IDocument document)
|
private static INode MfmCodeBlockNode(MfmNodeTypes.MfmCodeBlockNode node, IDocument document)
|
||||||
{
|
{
|
||||||
var el = document.CreateElement("pre");
|
var el = document.CreateElement("pre");
|
||||||
|
el.ClassName = "code-pre";
|
||||||
var childEl = document.CreateElement("code");
|
var childEl = document.CreateElement("code");
|
||||||
childEl.TextContent = node.Code;
|
childEl.TextContent = node.Code;
|
||||||
el.AppendChild(childEl);
|
el.AppendChild(childEl);
|
||||||
|
|
Loading…
Add table
Reference in a new issue