Skip to content

Commit

Permalink
CLI bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbarex committed Aug 5, 2024
1 parent 676883d commit 349ab20
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions qlmarkdown_cli/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ while i < Int(CommandLine.argc) {
case "--syntax-highlight":
settings.syntaxHighlightExtension = parseArgOnOff(index: i)
i += 1
case "--sub":
settings.subExtension = parseArgOnOff(index: i)
i += 1
case "--sup":
settings.supExtension = parseArgOnOff(index: i)
i += 1
case "--hard-break":
settings.hardBreakOption = parseArgOnOff(index: i)
i += 1
Expand Down Expand Up @@ -330,6 +336,16 @@ for url in files {

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

settings.renderStats += 1
if settings.renderStats > 0 && settings.renderStats % 100 == 0 {
print("""
*** *** *** *** *** ***
Thanks to this application you have viewed over \(settings.renderStats) files.
If you find it useful and you have the possibility, consider buying me a coffee! (https://buymeacoffee.com/sbarex)
*** *** *** *** *** ***
""")
}

var output: URL?
if let dest = dest {
var isDir: ObjCBool = false
Expand Down

0 comments on commit 349ab20

Please sign in to comment.