Title: CRLF in multiline headers adds an extra blank row · Issue #488 · astanin/python-tabulate · GitHub
Open Graph Title: CRLF in multiline headers adds an extra blank row · Issue #488 · astanin/python-tabulate
X Title: CRLF in multiline headers adds an extra blank row · Issue #488 · astanin/python-tabulate
Description: A header containing Windows-style CRLF (\r\n) renders with an extra blank header row. The same header with LF renders as two lines. Reproduced on current main (268615a5c27dc40e5c22454c07b44d5c50410da0) with CPython 3.14.8 on Windows: fro...
Open Graph Description: A header containing Windows-style CRLF (\r\n) renders with an extra blank header row. The same header with LF renders as two lines. Reproduced on current main (268615a5c27dc40e5c22454c07b44d5c50410...
X Description: A header containing Windows-style CRLF (\r\n) renders with an extra blank header row. The same header with LF renders as two lines. Reproduced on current main (268615a5c27dc40e5c22454c07b44d5c50410...
Opengraph URL: https://github.com/astanin/python-tabulate/issues/488
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CRLF in multiline headers adds an extra blank row","articleBody":"A header containing Windows-style CRLF (`\\r\\n`) renders with an extra blank header row. The same header with LF renders as two lines.\n\nReproduced on current `main` (`268615a5c27dc40e5c22454c07b44d5c50410da0`) with CPython 3.14.8 on Windows:\n\n```python\nfrom tabulate import tabulate\n\nprint(tabulate([[1]], headers=['A\\nB'], tablefmt='grid'))\nprint(tabulate([[1]], headers=['A\\r\\nB'], tablefmt='grid'))\n```\n\nThe LF header renders as:\n\n```text\n+-----+\n| A |\n| B |\n+=====+\n| 1 |\n+-----+\n```\n\nThe CRLF header instead renders as:\n\n```text\n+-----+\n| A |\n| |\n| B |\n+=====+\n| 1 |\n+-----+\n```\n\nExpected: CRLF and LF represent one line break and produce the same two-line header. A data cell containing `A\\r\\nB` renders as two lines, so this appears specific to header alignment.\n\n`_align_header` splits using `_multiline_codes = re.compile(r'\\r|\\n|\\r\\n')`; the `\\r` alternative consumes the first half of a CRLF before the `\\r\\n` alternative can match.","author":{"url":"https://github.com/agammann","@type":"Person","name":"agammann"},"datePublished":"2026-11-01T01:36:12Z","url":"https://github.com/astanin/python-tabulate/issues/488"}
| 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:ef27d4cb-4708-a023-c01b-73c1249d4448 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 902E:2826BD:2F31D8F:3FB713B:6AFF1868 |
| html-safe-nonce | 06a80d55f1be1a203da722c668505fb8bdf97385c9102d4933b903c13b8ee90f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDJFOjI4MjZCRDoyRjMxRDhGOjNGQjcxM0I6NkFGRjE4NjgiLCJ2aXNpdG9yX2lkIjoiODA2NjI2MDk5MTAxNDI3OTI3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6423a62db3cb730c0f493ad56a05cf0897c016d8e89ce53c32525ce3ef45372e |
| hovercard-subject-tag | issue:6142000190 |
| 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/488/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dca0923a57508e960f1f785ec3317c6349b20cc4c7a16d25f2f5a89c71201c21/astanin/python-tabulate/issues/488 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dca0923a57508e960f1f785ec3317c6349b20cc4c7a16d25f2f5a89c71201c21/astanin/python-tabulate/issues/488 |
| og:image:alt | A header containing Windows-style CRLF (\r\n) renders with an extra blank header row. The same header with LF renders as two lines. Reproduced on current main (268615a5c27dc40e5c22454c07b44d5c50410... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | agammann |
| hostname | github.com |
| expected-hostname | github.com |
| None | 09f89b47d4ae91bc6625123d192f4df7ef49aee8b33380c1e126c49d89e5ea83 |
| 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 | a83af9755c14340f81939fad707c94b944f8296c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width