aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2026-06-21 19:35:23 +0200
committerRuben Beltran del Rio <jj@r.bdr.sh>2026-06-21 19:36:16 +0200
commitab1d7a447c87509136edfff2202ef2c012a4c11a (patch)
tree3833883298a0c5faaf32966d3ba7e70fc10fa260
parent49b0f4a3fb0064313d16782839865b763ef760ce (diff)
Update list styles1.2.1
-rw-r--r--Sources/NorgUI/Views/Blocks/BlockView.swift5
-rw-r--r--Sources/NorgUI/Views/Blocks/ListItemView.swift6
2 files changed, 9 insertions, 2 deletions
diff --git a/Sources/NorgUI/Views/Blocks/BlockView.swift b/Sources/NorgUI/Views/Blocks/BlockView.swift
index 59fcb78..9889fe9 100644
--- a/Sources/NorgUI/Views/Blocks/BlockView.swift
+++ b/Sources/NorgUI/Views/Blocks/BlockView.swift
@@ -18,11 +18,12 @@ struct BlockView: View {
case .unorderedListItem(_, let status, let content, let line):
ListItemView(
- marker: "•", status: status, content: content, line: line, onSetStatus: onSetStatus)
+ marker: "✳", showsMarkerWithTask: false, status: status, content: content, line: line,
+ onSetStatus: onSetStatus)
case .orderedListItem(_, let status, let content, let line):
ListItemView(
- marker: "\(ordinal ?? 1).", status: status, content: content,
+ marker: "\(ordinal ?? 1).", showsMarkerWithTask: true, status: status, content: content,
line: line, onSetStatus: onSetStatus)
case .quote(_, let status, let content, let line):
diff --git a/Sources/NorgUI/Views/Blocks/ListItemView.swift b/Sources/NorgUI/Views/Blocks/ListItemView.swift
index ffff2eb..3429a42 100644
--- a/Sources/NorgUI/Views/Blocks/ListItemView.swift
+++ b/Sources/NorgUI/Views/Blocks/ListItemView.swift
@@ -5,6 +5,7 @@ struct ListItemView: View {
@Environment(\.norgTheme) private var theme
let marker: String
+ let showsMarkerWithTask: Bool
let status: TaskStatus?
let content: [InlineSpan]
let line: Int
@@ -13,6 +14,11 @@ struct ListItemView: View {
var body: some View {
HStack(alignment: .firstTextBaseline, spacing: 8) {
if let status {
+ if showsMarkerWithTask {
+ Text(marker)
+ .foregroundStyle(.secondary)
+ .monospacedDigit()
+ }
BlockTaskRow(
status: status, content: content, font: theme.body, line: line, onSetStatus: onSetStatus
)