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

Only the first paragraph in a table celle is converted, while the other paragraphs are lost in translation #44

Open
jimjyang opened this issue Sep 9, 2022 · 3 comments
Labels

Comments

@jimjyang
Copy link

jimjyang commented Sep 9, 2022

When you have more than one paragraph in a table celle, only the first paragraph is converted into asciidoc, while the other paragraphs are omitted (lost in translation).

@ggrossetie
Copy link
Owner

Hey!
Could you please share a sample Google Doc that reproduces this issue? That would be really helpful. Thanks!

@jimjyang
Copy link
Author

@Mogztter

Hey! Could you please share a sample Google Doc that reproduces this issue? That would be really helpful. Thanks!

Sure. Here you are:
image

@ggrossetie
Copy link
Owner

Thanks, I can reproduce this issue!
The root cause is that we get only the first child:

https://github.com/Mogztter/asciidoc-googledocs-addon/blob/b70259eea794eb0254741c08ed90cab42ea02eef/app/Code.gs#L272

What we need to do is:

for (var i = 0; i < tableCell.getNumChildren(); i++) {
  result = result + asciidocHandleChild(tableCell.getChild(i));
}

We might need to add a newline between children.

@ggrossetie ggrossetie added the bug label Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants