8000 Fix the right-border on unicode tables by orlitzky · Pull Request #39023 · sagemath/sage · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix the right-border on unicode tables #39023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

orlitzky
Copy link
Contributor

Turn

 sage: table([1],frame=True)
┌───┐
│ 1 |
└───┘

into

sage: table([1],frame=True)
┌───┐
│ 1 │
└───┘

which should look a bit better (depends on your font) and is more consistent (the left and right borders now match).

It looks like during the conversion to unicode, the right borders of
table cells were overlooked. Instead of a nice unicode character, they
still have an ASCII pipe. For example,

  sage: table([1],frame=True)
  ┌───┐
  │ 1 |
  └───┘

This commit changes it to a unicode thingy, just like the left
borders,

  sage: table([1],frame=True)
  ┌───┐
  │ 1 │
  └───┘

and updates all of the tests in sage.misc.table.
The right borders of table cells have been updated to use unicode
instead of an ASCII pipe, so any tests that print tables need to
be changed.
Copy link

Documentation preview for this PR (built with commit c5d9fc2; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Contributor
@user202729 user202729 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tl;dr the change is from


sage: unicodedata.name('|')
'VERTICAL LINE'

to

sage: unicodedata.name('│')
'BOX DRAWINGS LIGHT VERTICAL'

Makes sense. (why did nobody notice this earlier)

8000
Copy link
Contributor
@mantepse mantepse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thank you!

@orlitzky
Copy link
Contributor Author

Thanks!

vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 6, 2024
sagemathgh-39023: Fix the right-border on unicode tables
    
Turn

```
 sage: table([1],frame=True)
┌───┐
│ 1 |
└───┘
```

into

```
sage: table([1],frame=True)
┌───┐
│ 1 │
└───┘
```

which should look a bit better (depends on your font) and is more
consistent (the left and right borders now match).
    
URL: sagemath#39023
Reported by: Michael Orlitzky
Reviewer(s): Martin Rubey, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 8, 2024
sagemathgh-39023: Fix the right-border on unicode tables
    
Turn

```
 sage: table([1],frame=True)
┌───┐
│ 1 |
└───┘
```

into

```
sage: table([1],frame=True)
┌───┐
│ 1 │
└───┘
```

which should look a bit better (depends on your font) and is more
consistent (the left and right borders now match).
    
URL: sagemath#39023
Reported by: Michael Orlitzky
Reviewer(s): Martin Rubey, user202729
@vbraun vbraun merged commit e44e10e into sagemath:develop Dec 8, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0