aboutsummaryrefslogtreecommitdiff
path: root/Sources/NorgKit/Models/InlineSpan.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2026-06-16 12:08:21 +0200
committerRuben Beltran del Rio <jj@r.bdr.sh>2026-06-16 12:22:47 +0200
commit501fdce29e4d2c46c4708ad7f44056878e0db3fa (patch)
treedb923b77037db9f5b37600a6e34c3bb2e8a971be /Sources/NorgKit/Models/InlineSpan.swift
Initial extraction from Norganize1.0.0
Diffstat (limited to 'Sources/NorgKit/Models/InlineSpan.swift')
-rw-r--r--Sources/NorgKit/Models/InlineSpan.swift12
1 files changed, 12 insertions, 0 deletions
diff --git a/Sources/NorgKit/Models/InlineSpan.swift b/Sources/NorgKit/Models/InlineSpan.swift
new file mode 100644
index 0000000..bebe60b
--- /dev/null
+++ b/Sources/NorgKit/Models/InlineSpan.swift
@@ -0,0 +1,12 @@
+/// A contiguous run of text sharing the same style and link.
+public struct InlineSpan: Equatable, Hashable, Sendable, Codable {
+ public var text: String
+ public var styles: InlineStyle
+ public var link: InlineLink?
+
+ public init(text: String, styles: InlineStyle = [], link: InlineLink? = nil) {
+ self.text = text
+ self.styles = styles
+ self.link = link
+ }
+}