Skip to content

Conversation

@analytically
Copy link
Contributor

Other fixes:

  • Fix hyperlink URL parsing to preserve semicolons in URLs by only splitting on first two semicolons
  • Fix non-ASCII character encoding in URLs to encode individual characters rather than entire string

…d indexing as per ANSI spec.

Other fixes:
- Fix hyperlink URL parsing to preserve semicolons in URLs by only
  splitting on first two semicolons
- Fix non-ASCII character encoding in URLs to encode individual
  characters rather than entire string

Signed-off-by: Mathias Bogaert <[email protected]>
@analytically analytically requested a review from a team as a code owner October 28, 2025 18:08
@analytically
Copy link
Contributor Author

Pipeline to test:

---
jobs:
  - name: csi-g-test
    plan:
      - task: test-csi-g
        config:
          platform: linux
          image_resource:
            type: registry-image
            source:
              repository: python
              tag: "3.11"
          run:
            path: sh
            args:
              - -exc
              - |
                pip install rich
                cat > test.py << 'EOF'
                from rich.console import Console
                console = Console(width=180, force_terminal=True)
                
                # Test CSI G positioning
                for col in [1, 30, 60, 90, 120, 150, 180]:
                    console.file.write(f"\033[{col}G")
                    console.file.flush()
                    console.print(f"|{col}", end="")
                console.print()
                EOF
                
                python3 test.py

Before:
screentshot-2025-10-28 at 18 08 44@2x

After:
screentshot-2025-10-28 at 18 10 09@2x

@analytically
Copy link
Contributor Author

DO NOT MERGE. Newer version of elm-ansi is coming with a lot more improvements.

@taylorsilva
Copy link
Member

I see v12 of elm-ansi is out: vito/elm-ansi@264ff3c

Is it safe to bump to the new major?

@analytically
Copy link
Contributor Author

It should work yeah. I still have some issue with width calculation.

@taylorsilva taylorsilva moved this from Todo to Waiting on Contributor in Pull Requests Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Waiting on Contributor

Development

Successfully merging this pull request may close these issues.

2 participants