From 349ab20c8964bf3646fbb51704b6556551ccee3e Mon Sep 17 00:00:00 2001 From: sbarex Date: Mon, 5 Aug 2024 16:24:07 +0200 Subject: [PATCH] CLI bugfix. --- qlmarkdown_cli/main.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/qlmarkdown_cli/main.swift b/qlmarkdown_cli/main.swift index 547bab9..ae0abc7 100644 --- a/qlmarkdown_cli/main.swift +++ b/qlmarkdown_cli/main.swift @@ -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 @@ -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