Skip to content

Commit 626a5f4

Browse files
author
pyed
committed
Correct markdown escaper
1 parent e9b3b7f commit 626a5f4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

main.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,9 @@ var (
126126
// duration controls how many intervals will happen
127127
duration = 10
128128

129-
// escape markdown
129+
// asterisk may cause problems parsing markdown, replace it with `•`
130130
// affects only markdown users: info, active, head, tail
131-
mdReplacer = strings.NewReplacer("*", "\\*",
132-
"[", "\\[",
133-
"_", "\\_",
134-
"`", "\\`")
131+
mdReplacer = strings.NewReplacer("*", "•")
135132
)
136133

137134
// init flags
@@ -247,7 +244,8 @@ func init() {
247244
var err error
248245
rtorrent, err = rtapi.NewRtorrent(SCGIURL)
249246
if err != nil {
250-
fmt.Fprint(os.Stderr, "[ERROR] rTorrent: %s\n", err)
247+
fmt.Fprintf(os.Stderr, "[ERROR] rTorrent: %s\n", err)
248+
os.Exit(1)
251249
}
252250
}
253251

0 commit comments

Comments
 (0)