Skip to content

Commit 349ab20

Browse files
committed
CLI bugfix.
1 parent 676883d commit 349ab20

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

qlmarkdown_cli/main.swift

+16
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ while i < Int(CommandLine.argc) {
134134
case "--syntax-highlight":
135135
settings.syntaxHighlightExtension = parseArgOnOff(index: i)
136136
i += 1
137+
case "--sub":
138+
settings.subExtension = parseArgOnOff(index: i)
139+
i += 1
140+
case "--sup":
141+
settings.supExtension = parseArgOnOff(index: i)
142+
i += 1
137143
case "--hard-break":
138144
settings.hardBreakOption = parseArgOnOff(index: i)
139145
i += 1
@@ -330,6 +336,16 @@ for url in files {
330336

331337
let html = settings.getCompleteHTML(title: url.lastPathComponent, body: text, basedir: markdown_url.deletingLastPathComponent(), forAppearance: appearance)
332338

339+
settings.renderStats += 1
340+
if settings.renderStats > 0 && settings.renderStats % 100 == 0 {
341+
print("""
342+
*** *** *** *** *** ***
343+
Thanks to this application you have viewed over \(settings.renderStats) files.
344+
If you find it useful and you have the possibility, consider buying me a coffee! (https://buymeacoffee.com/sbarex)
345+
*** *** *** *** *** ***
346+
""")
347+
}
348+
333349
var output: URL?
334350
if let dest = dest {
335351
var isDir: ObjCBool = false

0 commit comments

Comments
 (0)