diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2026-06-16 12:08:21 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2026-06-16 12:22:47 +0200 |
| commit | 501fdce29e4d2c46c4708ad7f44056878e0db3fa (patch) | |
| tree | db923b77037db9f5b37600a6e34c3bb2e8a971be /Sources/NorgKit/Extensions/Array+InlineSpan.swift | |
Initial extraction from Norganize1.0.0
Diffstat (limited to 'Sources/NorgKit/Extensions/Array+InlineSpan.swift')
| -rw-r--r-- | Sources/NorgKit/Extensions/Array+InlineSpan.swift | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Sources/NorgKit/Extensions/Array+InlineSpan.swift b/Sources/NorgKit/Extensions/Array+InlineSpan.swift new file mode 100644 index 0000000..167bfce --- /dev/null +++ b/Sources/NorgKit/Extensions/Array+InlineSpan.swift @@ -0,0 +1,7 @@ +/// Extends behavior of InlineSpan arrays. +extension Array where Element == InlineSpan { + /// The concatenated plain text of all spans, ignoring styling. + public var plainText: String { + map(\.text).joined() + } +} |