Title: ANSI escape detection doesn't work in byte strings · Issue #164 · astanin/python-tabulate · GitHub
Open Graph Title: ANSI escape detection doesn't work in byte strings · Issue #164 · astanin/python-tabulate
X Title: ANSI escape detection doesn't work in byte strings · Issue #164 · astanin/python-tabulate
Description: The column length correctly considers ANSI escapes for strings: >>> print(tabulate.tabulate([['asdf', '\x1b[31masdf\x1b[0m']])) ---- ---- asdf asdf ---- ---- But not for bytes: >>> print(tabulate.tabulate([[b'asdf', b'\x1b[31masdf\x1b[0m...
Open Graph Description: The column length correctly considers ANSI escapes for strings: >>> print(tabulate.tabulate([['asdf', '\x1b[31masdf\x1b[0m']])) ---- ---- asdf asdf ---- ---- But not for bytes: >>> print(tabulate.t...
X Description: The column length correctly considers ANSI escapes for strings: >>> print(tabulate.tabulate([['asdf', '\x1b[31masdf\x1b[0m']])) ---- ---- asdf asdf ---- ---- But not for by...
Opengraph URL: https://github.com/astanin/python-tabulate/issues/164
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ANSI escape detection doesn't work in byte strings","articleBody":"The column length correctly considers ANSI escapes for strings:\r\n```\r\n>>> print(tabulate.tabulate([['asdf', '\\x1b[31masdf\\x1b[0m']]))\r\n---- ----\r\nasdf asdf\r\n---- ----\r\n```\r\nBut not for bytes:\r\n```\r\n>>> print(tabulate.tabulate([[b'asdf', b'\\x1b[31masdf\\x1b[0m']]))\r\n---- -------------\r\nasdf asdf\r\n---- -------------\r\n```","author":{"url":"https://github.com/msimacek","@type":"Person","name":"msimacek"},"datePublished":"2022-01-20T12:43:29Z","url":"https://github.com/astanin/python-tabulate/issues/164"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c1defe8c-9208-1430-5067-1c7089510325 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E04C:2445C3:91BEE0:C76EB8:6AFF3CEF |
| html-safe-nonce | a0b396509f9933abdfbfc390e3e6349dec9ff982555b556f3702e8f4dbdc56c7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDRDOjI0NDVDMzo5MUJFRTA6Qzc2RUI4OjZBRkYzQ0VGIiwidmlzaXRvcl9pZCI6IjI0NDkyMDExODk2MjM5MDU1MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 19d1fc534ee8a7842b70d21579faf57c0b344f8005c7cdc4b1791b8c6060bcf0 |
| hovercard-subject-tag | issue:1109256955 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/astanin/python-tabulate/164/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4124a4302764e4dd5a3950ca2f66eacd93cab666a4781730c793f956dd48b44a/astanin/python-tabulate/issues/164 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4124a4302764e4dd5a3950ca2f66eacd93cab666a4781730c793f956dd48b44a/astanin/python-tabulate/issues/164 |
| og:image:alt | The column length correctly considers ANSI escapes for strings: >>> print(tabulate.tabulate([['asdf', '\x1b[31masdf\x1b[0m']])) ---- ---- asdf asdf ---- ---- But not for bytes: >>> print(tabulate.t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msimacek |
| hostname | github.com |
| expected-hostname | github.com |
| None | 07f40d184b74ca701a2005d4a164bf7038be26fc145c2623336a91fe477cc584 |
| turbo-cache-control | no-preview |
| go-import | github.com/astanin/python-tabulate git https://github.com/astanin/python-tabulate.git |
| octolytics-dimension-user_id | 71802 |
| octolytics-dimension-user_login | astanin |
| octolytics-dimension-repository_id | 205875548 |
| octolytics-dimension-repository_nwo | astanin/python-tabulate |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 205875548 |
| octolytics-dimension-repository_network_root_nwo | astanin/python-tabulate |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8e428a801c2dccf4d1f411040a0e0b7fab7d4061 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width