Title: Empty line handling fix · Issue #440 · astanin/python-tabulate · GitHub
Open Graph Title: Empty line handling fix · Issue #440 · astanin/python-tabulate
X Title: Empty line handling fix · Issue #440 · astanin/python-tabulate
Description: Hey, not sure if this is an actual issue but figured I'd mention it. There's a small bug in _wrap_text_to_colwidths (tabulate/__init__.py) where intentional blank lines in multiline cell content get stripped out during wrapping. So if yo...
Open Graph Description: Hey, not sure if this is an actual issue but figured I'd mention it. There's a small bug in _wrap_text_to_colwidths (tabulate/__init__.py) where intentional blank lines in multiline cell content ge...
X Description: Hey, not sure if this is an actual issue but figured I'd mention it. There's a small bug in _wrap_text_to_colwidths (tabulate/__init__.py) where intentional blank lines in multiline cell co...
Opengraph URL: https://github.com/astanin/python-tabulate/issues/440
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Empty line handling fix","articleBody":"Hey, not sure if this is an actual issue but figured I'd mention it. There's a small bug in `_wrap_text_to_colwidths` (`tabulate/__init__.py`) where intentional blank lines in multiline cell content get stripped out during wrapping. So if you have a cell like \"para 1\\n\\n para 2\" and use maxcolwidths, the blank line between paragraphs just disappears.\n\nLooks like it's this line:\n\n`if line.strip() != \"\"`\n\nWhich is in the list comprehension that filters lines before wrapping. Just deleting that condition fixes it. `wrapper.wrap(\"\")` already returns [], and `\"\\n\".join([])` returns `\"\"`, so the existing pipeline handles blank lines fine once that filter's gone. ","author":{"url":"https://github.com/lukeeheller","@type":"Person","name":"lukeeheller"},"datePublished":"2026-08-22T13:08:09Z","url":"https://github.com/astanin/python-tabulate/issues/440"}
| 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:f961ba8c-9114-134f-7746-faac16f0c81c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 98A4:211E92:2CAC21:3D2477:6AFF24DF |
| html-safe-nonce | 783af0d8b42321db5310a88ab461ff8c2a2f30f829f77dd0e8fe10d1b2d09954 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEE0OjIxMUU5MjoyQ0FDMjE6M0QyNDc3OjZBRkYyNERGIiwidmlzaXRvcl9pZCI6Ijc5NjIxNTg0NjU1OTIyNzIwOTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 04d0cf27fdf48a476cba28857163d1a515122005cb5c702f2f4b9d3d97df937c |
| hovercard-subject-tag | issue:5222043921 |
| 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/440/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a4850daafe10b592db725295b238922d0dc64437f26a89318243ef9e482b1113/astanin/python-tabulate/issues/440 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a4850daafe10b592db725295b238922d0dc64437f26a89318243ef9e482b1113/astanin/python-tabulate/issues/440 |
| og:image:alt | Hey, not sure if this is an actual issue but figured I'd mention it. There's a small bug in _wrap_text_to_colwidths (tabulate/__init__.py) where intentional blank lines in multiline cell content ge... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lukeeheller |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2ff2d37f6b6f9a9c91f18d54cf30d0d9e07d017eaab345cd5e6fb05715e02284 |
| 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 | 9bfe6f375bb68c197004966721f6e7a3a0843cf5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width