Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Txt line break #322

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Txt line break #322

wants to merge 3 commits into from

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) |                  |
+---------------+------------------+

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.

None yet

1 participant