Skip to content

Commit 289479d

Browse files
committed
fix
1 parent c4d9060 commit 289479d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

modules/markup/html_codepreview.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ func renderCodeBlock(ctx *RenderContext, node *html.Node) (urlPosStart, urlPosSt
6161

6262
func codePreviewPatternProcessor(ctx *RenderContext, node *html.Node) {
6363
for node != nil {
64+
if node.Type != html.TextNode {
65+
node = node.NextSibling
66+
continue
67+
}
6468
urlPosStart, urlPosEnd, h, err := renderCodeBlock(ctx, node)
6569
if err != nil || h == "" {
6670
if err != nil {

web_src/css/markup/codepreview.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.markup .code-preview-container {
22
border: 1px solid var(--color-secondary);
3+
border-radius: var(--border-radius);
34
margin: 0.25em 0;
45
}
56

@@ -13,6 +14,7 @@
1314
width: 100%;
1415
max-height: 100px;
1516
overflow-y: auto;
17+
margin: 0; /* override ".markup table {margin}" */
1618
}
1719

1820
/* override the polluted styles from the content.css: ".markup table ..." */

0 commit comments

Comments
 (0)