Skip to content

Conversation

@jsbueno
Copy link
Collaborator

@jsbueno jsbueno commented Apr 6, 2019

This PR fixes the immediate issues exposed at
https://gist.github.com/turicas/8bd86dd425d2212dbe214d725121be7c?fbclid=IwAR1VitQE02l7OiCjCKDsdYTJJ9-mC53xlFOD2yhWoxZyCPWrjqchl7H7CPo

That is - any cell containing a line-feed character breaks the text-plugin output.

Besides creating multiline cells in the text output, the code also includes a "blank" line bellow any row having a multi-line cell, so that contents are visually separateted.

Not covered by this code: Parsing back text-tables with multi-line cells.
(I invite the discussion of what features would be better to enable that in this very same PR -
although merging it as is will be mostly harmless - the output of the text plug-in is supposed to be pretty, but it is a dangerous road to ensure data integrity round-trip between its output and back - multi-line cells will complicate a lot the current logic)

@jsbueno
Copy link
Collaborator Author

jsbueno commented Apr 6, 2019

"before :"

+-----------------------+----------------------------------+
|          nome         |             endereco             |
+-----------------------+----------------------------------+
|         José da Silva | Rua dos Bobos, 0
Cidade Fantasma |
| José Maria
(Zé Maria) |                       R. XPTO, 1 |
+-----------------------+----------------------------------+

"after" :

+---------------+------------------+
|      nome     |     endereco     |
+---------------+------------------+
| José da Silva | Rua dos Bobos, 0 |
|               |  Cidade Fantasma |
|               |                  |
|    José Maria |       R. XPTO, 1 |
|    (Zé Maria) |                  |
+---------------+------------------+

@turicas turicas added this to the Version 0.5.0 milestone Mar 21, 2025
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.

2 participants