Feature 151/task view multilines #154
No reviewers
Labels
No labels
bug
ci
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
performance
priority
P0
priority
P1
priority
P2
question
refactor
size
L
size
M
size
S
size
XL
size
XS
tests
trivial
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/paso!154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature-151/task-view-multilines"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
CONTRIBUTING.mdgo test ./... -race) locallygofmt -w .andgolangci-lint run ./...respectivelyREADME.mdif applicableSummary
len(m)returns the byte length of the match, not the terminal column width. For the•marker (U+2022),len("• ")is 4 (3 UTF-8 bytes + 1 space) but its visual width is 2 columns. This means:hangbecomes 4 spaces instead of 2 — continuation lines are indented 2 columns past where the bullet text actually starts.limit - len(hang)narrows the wrap budget by 4 columns instead of 2 — lines wrap unnecessarily early.•is explicitly documented as a supported marker in SKILL.md (line ~184), so this is a guaranteed rendering defect for any wrapped bullet item using that character.Fix: use
uniseg.StringWidth(orxansi's own width helper if one is exposed) to measuremin terminal columns instead of bytes.@ -11,0 +13,4 @@// be hang-indented under the marker's text. Covers "- ", "* ", "• ", checkbox// "[ ] "/"[x] ", and numbered "1. "/"1) " markers, with optional leading// whitespace.var listMarkerRe = regexp.MustCompile(`^(\s*(?:[-*•]|\[.?\]|\d+[.)])\s+)`)The outer group is a capturing group
(…)but the only call site usesFindString, which returns the full match and ignores sub-captures. The group should be non-capturing to avoid an unnecessary tracking allocation.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.