[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
|
@ -84,4 +84,10 @@
|
|||
.plain {
|
||||
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)
|
||||
{
|
||||
var el = document.CreateElement("pre");
|
||||
el.ClassName = "code-pre";
|
||||
var childEl = document.CreateElement("code");
|
||||
childEl.TextContent = node.Code;
|
||||
el.AppendChild(childEl);
|
||||
|
|
Loading…
Add table
Reference in a new issue