Commit 36627fe7d3
Verified · cmc
Layout: unified · split
Sources/OrgCore/Compute/Babel.swift +2 −1
| @@ -413,7 +413,8 @@ public enum Babel { | ||
| 413 | 413 | let shebang = params.single[":shebang"].flatMap { $0.contains(where: { !$0.isWhitespace }) ? $0 : nil } |
| 414 | 414 | if session == nil, stdin != nil || cmdline != nil || shebang != nil { |
| 415 | 415 | // `org-babel-sh-evaluate`: an executable script, run by the shell with the |
| 416 | // command line after it and `:stdin` as its input; the value is its last line. | |
| 416 | // command line after it and `:stdin` as its input; the result is its standard | |
| 417 | // output, or its exit status for `:results value`. | |
| 417 | 418 | var script = (shebang ?? "#!/usr/bin/env \(executable)") + "\n" |
| 418 | 419 | if params.single[":padline"] != "no" { script += "\n" } |
| 419 | 420 | script += (lines + [body]).joined(separator: "\n") + (valueIsExitStatus ? "\necho $?" : "") |
Sources/OrgPresentation/Presentation.swift +1 −1
| @@ -51,7 +51,7 @@ public enum SyntaxCategory: String, Hashable, Sendable, CaseIterable { | ||
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | /// Highlights source code; the platform supplies one (tree-sitter on macOS and iOS). | |
| 54 | /// Highlights source code; the platform supplies one (tree-sitter on macOS; iOS supplies none). | |
| 55 | 55 | public protocol CodeHighlighter: Sendable { |
| 56 | 56 | /// Categories for ranges of `code`, in UTF-16 offsets; later runs win over earlier ones. |
| 57 | 57 | /// Empty for languages it doesn't know. |