This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Markdown | |
extension Markup { | |
func write(to destination: URL, formatOptions: MarkupFormatter.Options = .default, atomically useAuxiliaryFile: Bool = true, encoding: String.Encoding = .utf8) throws { | |
let string = format(options: formatOptions) | |
try string.write(to: destination, atomically: useAuxiliaryFile, encoding: encoding) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
import os | |
// print debug helper function for Playground envoironment and Shortcuts.app | |
func log(_ item: String, function: String = #function) { | |
let isRunningOnPlayground = CommandLine.arguments.filter({ !$0.isEmpty }).isEmpty | |
if isRunningOnPlayground { | |
Swift.print("\(function) \(item)") | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"#(ハッシュ)", | |
"#7thFestival!", | |
"#a", | |
"#b", | |
"#c", | |
"#d", | |
"#e", | |
"#f", | |
"#MEMO", |
OlderNewer