krz/orgstar

A native macOS editor for org-mode files. editor org-mode swift

Commit 36627fe7d3

36627fe7d3bd0be3dc76c6a503e7d1b824e0abab

parent: 9ec764defc

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-08 03:59 UTC

Correct the highlighter and shell script comments

OrgstarMobile has no tree-sitter highlighter. A script-mode shell block's
result is its standard output, or its exit status for :results value,
as org-babel-sh-evaluate gives.

Layout: unified · split

Sources/OrgCore/Compute/Babel.swift +2 −1
@@ -413,7 +413,8 @@ public enum Babel {
413413 let shebang = params.single[":shebang"].flatMap { $0.contains(where: { !$0.isWhitespace }) ? $0 : nil }
414414 if session == nil, stdin != nil || cmdline != nil || shebang != nil {
415415 // `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`.
417418 var script = (shebang ?? "#!/usr/bin/env \(executable)") + "\n"
418419 if params.single[":padline"] != "no" { script += "\n" }
419420 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 {
5151 }
5252}
5353
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).
5555public protocol CodeHighlighter: Sendable {
5656 /// Categories for ranges of `code`, in UTF-16 offsets; later runs win over earlier ones.
5757 /// Empty for languages it doesn't know.