Fix markdown block formatting in Browser REPL help output#2180
Fix markdown block formatting in Browser REPL help output#2180
Conversation
When calling the `help()` metacommand in the ShellV2 frontend, the description is formatted via `wrapText`. For markdown code blocks, preserving heavy indentation from the original JSON results in broken, unreadable output in the terminal. This commit updates `wrapText` in `useShellTerminal.ts` to: - Split the source text by newlines (`\n`) instead of just spaces to respect existing line breaks. - Identify markdown code blocks by lines starting with ` ``` `. - Inside markdown blocks, bypass word wrapping and enforce exactly a 2-space indentation by stripping existing leading whitespace. - Preserve standard word-wrapping for standard non-markdown lines. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Updated the
wrapTextfunction in the Browser REPL's frontend terminal component (useShellTerminal.ts) to fix how markdown code block indentation is displayed. Instead of preserving massive amounts of whitespace that cause unreadable jagged text, it now compacts indentation to exactly 2 spaces when rendering inside markdown```blocks.PR created automatically by Jules for task 18081513464735954574 started by @KCarretto