Skip to content

Commit 992c3e9

Browse files
committed
Edit ContentFmt to fix code block in list
1 parent 3320a60 commit 992c3e9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

static/css/main.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,21 @@ h1.br-nav, h2.br-nav, h3.br-nav, h4.br-nav {color:#777;font-size: 1em;font-weigh
126126
background: #f5f5f5;
127127
padding: .3em;
128128
border-radius: 4px;
129+
opacity: 0.6;
129130
}
130131
.copy-btn {
131132
position: absolute;
132133
top: 8px;
133134
right: 8px;
134135
padding: 4px 8px;
135-
background: #4CAF50;
136+
background: #ccc;
136137
color: white;
137138
border: none;
138139
border-radius: 3px;
139140
cursor: pointer;
140141
transition: opacity 0.3s;
141142
font-size: .7rem;
143+
opacity: 0.6;
142144
}
143145

144146
.copy-btn:hover {

util/content_fmt.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func ContentFmt(input string) string {
127127
codeTag := codeBlockTag + strconv.Itoa(len(codeRawMap)) + "]"
128128
codeRawMap[codeTag] = strings.Join(source, "\n")
129129

130-
return "\n\n" + codeTag + "\n\n"
130+
return codeTag
131131
}
132132

133133
return s

0 commit comments

Comments
 (0)