Title: bpython breaks line with ANSI escape code · Issue #670 · bpython/bpython · GitHub
Open Graph Title: bpython breaks line with ANSI escape code · Issue #670 · bpython/bpython
X Title: bpython breaks line with ANSI escape code · Issue #670 · bpython/bpython
Description: This can be easily reproduced by typing print('\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[3 1mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\0...
Open Graph Description: This can be easily reproduced by typing print('\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[3 1mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\03...
X Description: This can be easily reproduced by typing print('\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[3 1mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mO...
Opengraph URL: https://github.com/bpython/bpython/issues/670
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bpython breaks line with ANSI escape code","articleBody":"This can be easily reproduced by typing\r\n\r\n```\r\nprint('\\033[31mOK\\033[0m\\033[31mOK\\033[0m\\033[31mOK\\033[0m\\033[31mOK\\033[0m\\033[31mOK\\033[0m\\033[3\r\n1mOK\\033[0m\\033[31mOK\\033[0m\\033[31mOK\\033[0m\\033[31mOK\\033[0m\\033[31mOK\\033[0m\\033[31mOK\\033[0m\\033[3\r\n1mOK\\033[0m\\033[31mOK\\033[0m\\033[31mOK\\033[0m\\033[31mOK\\033[0m')\r\n```\r\n\r\nIn bpython\r\n\r\n\r\nIn Python\r\n\r\n\r\nI guess when calculating the length of output, bpython counts all chars, but not all chars are visible, thus leading to this bug.","author":{"url":"https://github.com/laike9m","@type":"Person","name":"laike9m"},"datePublished":"2017-03-19T03:54:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/670/bpython/issues/670"}
| 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:7f1786dc-eb4e-4060-84c3-fac25f23104c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 99CA:3E1F41:5D84E:842DA:6968BDD9 |
| html-safe-nonce | 857e5be0de8ee5649858504b0aff643c1eb1d5edcf617d5caa8f19547fabf344 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUNBOjNFMUY0MTo1RDg0RTo4NDJEQTo2OTY4QkREOSIsInZpc2l0b3JfaWQiOiI1MTcyMDk3NjQzNjUwMjY4NjMzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 90d04d1a9ed345909764d956146cd909e2945b31fa6ad729ca96a7e922627c03 |
| hovercard-subject-tag | issue:215239397 |
| 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/bpython/bpython/670/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fceaeb8db444d549be37a01fe18575f8eb7167dca9ed7e837f3858be504295e9/bpython/bpython/issues/670 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fceaeb8db444d549be37a01fe18575f8eb7167dca9ed7e837f3858be504295e9/bpython/bpython/issues/670 |
| og:image:alt | This can be easily reproduced by typing print('\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[3 1mOK\033[0m\033[31mOK\033[0m\033[31mOK\033[0m\033[31mOK\03... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | laike9m |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdc7c66bd36a6c12eb8e771e806db863266e573fc299e77f27505a768d4f8a98 |
| turbo-cache-control | no-preview |
| go-import | github.com/bpython/bpython git https://github.com/bpython/bpython.git |
| octolytics-dimension-user_id | 8071396 |
| octolytics-dimension-user_login | bpython |
| octolytics-dimension-repository_id | 21508865 |
| octolytics-dimension-repository_nwo | bpython/bpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21508865 |
| octolytics-dimension-repository_network_root_nwo | bpython/bpython |
| 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 | 3223a6503d318917691422cdadfbe16cd8fb21e5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width