Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.
Python agentsai-hackingai-penetration-testingai-pentestingai-securityartificial-intelligencebug-bountycode-qualityctf-toolscybersecuritycybersecurity-toolsethical-hackinghackingllm-securityoffensive-securitypenetration-testingpentesting-toolsred-teamingsecuritysecurity-automation
fix(tui): use single space after ordered-list marker (#1043)
OpenPayfe758af4fca9
diff --git a/strix/interface/tui/internal/render/agent_message.go b/strix/interface/tui/internal/render/agent_message.goindex 84715223..a1ca50aa 100644--- a/strix/interface/tui/internal/render/agent_message.go+++ b/strix/interface/tui/internal/render/agent_message.go@@ -100,7 +100,7 @@ func applyMarkdownStyles(text string) string {case strings.HasPrefix(line, "- "), strings.HasPrefix(line, "* "):out.WriteString(Col(Green).Render("• ") + inlineFormat(line[2:]))case len(line) > 2 && line[0] >= '0' && line[0] <= '9' && (line[1:3] == ". " || line[1:3] == ") "):- out.WriteString(Col(Green).Render(string(line[0])+". ") + inlineFormat(line[2:]))+ out.WriteString(Col(Green).Render(line[:2]+" ") + inlineFormat(line[3:]))case line == "---" || line == "***" || line == "___":out.WriteString(Col(Green).Render(strings.Repeat("─", 40)))default:diff --git a/strix/interface/tui/internal/render/markdown_test.go b/strix/interface/tui/internal/render/markdown_test.goindex cd701e26..a887f995 100644--- a/strix/interface/tui/internal/render/markdown_test.go+++ b/strix/interface/tui/internal/render/markdown_test.go@@ -72,6 +72,19 @@ func TestNonTablePipeLinesAreLeftAlone(t *testing.T) {}}+func TestMarkdownOrderedListsUseSingleSpaceAfterMarker(t *testing.T) {+ out := renderAssistantMarkdown("1. hello\n2) world")+ plain := ansi.Strip(out)+ for _, want := range []string{"1. hello", "2) world"} {+ if !strings.Contains(plain, want) {+ t.Fatalf("ordered list item %q missing: %q", want, plain)+ }+ }+ if strings.Contains(plain, "1. hello") || strings.Contains(plain, "2) world") {+ t.Fatalf("double space after the list marker: %q", plain)+ }+}+func TestInlineFormatKeepsNonEmphasisMarkers(t *testing.T) {literal := []string{"ls *.py *.go",