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

Whitespaces missing after using github integration #665

Open
Utzel opened this issue Dec 18, 2024 · 6 comments
Open

Whitespaces missing after using github integration #665

Utzel opened this issue Dec 18, 2024 · 6 comments

Comments

@Utzel
Copy link

Utzel commented Dec 18, 2024

When you connect github and edit a file the line breaks don't get carried back up to gitbook again.

How its looking in the original:
image

Downloaded code via the github link:
image

If you now push the file back up to gitbook the empty lines between the boxes don't get carried over. The spacing in the code before the push were not changed in any way. This sadly also happens for lists, basically rendering the whole github link useless...
Website after github push:
image

@addisonschultz
Copy link
Collaborator

I think this is expected from the way expandable sections are rendered in the front end - we’re also working on updating the in-app styles to match the published version for this block as well.

Can you try adding this in the whitespace to force the expandables into new lines?
 

@Utzel
Copy link
Author

Utzel commented Dec 18, 2024

Thanks for the reply :)
This sadly also happens for lists ("- ") with a spacing in between, so it goes beyond the expendables.

We tried the   but this results in a space thats bigger than the one we got by using an empty line in the gitbook app...

Image using  :
image
Image using a line break in gitbook
image

Also once you edit the file with   inside they get converted to the tag from gitbook   when you read them back in github.
I just find it quite confusing how the exported files generated from gitbook -> github with exactly the same syntax cant be read once committed from github...

@addisonschultz
Copy link
Collaborator

Thanks for pointing this out - basically, it sounds like the conversion of adding   (non breaking space) gets converted to a new markdown line with a space (new line +  )

But it sounds like neither option gives you a space between the expandable blocks 🤔

Can you try adding a h3 tag with empty content ( ) between the expandable blocks to see if that would work as a workaround for now?

@Utzel
Copy link
Author

Utzel commented Dec 19, 2024

Yes, that could be the issue with @nbsp;. It also adds an extra whitespace to text lines which offsets them.
h3 was till a bit to wide, h6 seems to do the trick, thanks for the help :)

@Utzel
Copy link
Author

Utzel commented Dec 19, 2024

Okay, sadly h6 also doesn't work for everything... When we want to have a spacing before a list the list gets overwritten and is instead displayed as *...

In this case there's also a link involved but I hope you get the point:
image

So I guess there is no real workaround for the spacing issue, which unfortunately renders the github link basically useless... The best case scenario would be for the addon to be able to import the text it exports from gitbook in exactly the same way.

@addisonschultz
Copy link
Collaborator

One last thing to try - if you use the h6 with “content” in it - does it stay?

The content can be a space: “ “.

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

No branches or pull requests

2 participants