Commit 9cd7a260bd
Unsigned
Layout: unified · split
Sources/OrgSwift/AST/OrgHTMLTreeRenderer.swift +5 −1
| @@ -5,7 +5,11 @@ import Foundation | |||
| 5 | /// The point of the prototype: this produces the same shape of output as the shipped | 5 | /// The point of the prototype: this produces the same shape of output as the shipped |
| 6 | /// single-pass ``OrgRenderer``, but from a parsed tree rather than from source, so a second | 6 | /// single-pass ``OrgRenderer``, but from a parsed tree rather than from source, so a second |
| 7 | /// renderer (see ``OrgAttributedStringRenderer``) can share the parse instead of re-deriving it. | 7 | /// renderer (see ``OrgAttributedStringRenderer``) can share the parse instead of re-deriving it. |
| 8 | public struct OrgHTMLTreeRenderer: Sendable { | 8 | /// |
| 9 | /// Not `Sendable`: it holds a ``CodeHighlighter``, and a real one wraps a thread-confined | ||
| 10 | /// engine (Highlightr's JavaScriptCore context, say). Sending the renderer across isolation | ||
| 11 | /// domains would call that engine off its thread. Make one where you render. | ||
| 12 | public struct OrgHTMLTreeRenderer { | ||
| 9 | /// The same options the shipped ``OrgRenderer`` takes, so this renderer is a drop-in for it. | 13 | /// The same options the shipped ``OrgRenderer`` takes, so this renderer is a drop-in for it. |
| 10 | public var options: OrgRenderOptions | 14 | public var options: OrgRenderOptions |
| 11 | public var highlighter: CodeHighlighter | 15 | public var highlighter: CodeHighlighter |