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

bookmark-label needs to retain significant spaces #738

Closed
Smylers opened this issue Nov 15, 2018 · 1 comment
Closed

bookmark-label needs to retain significant spaces #738

Smylers opened this issue Nov 15, 2018 · 1 comment

Comments

@Smylers
Copy link
Contributor

Smylers commented Nov 15, 2018

When a bookmark-label is composed from multiple components, the components shouldn't be trimmed where they meet: if the first component ends in a space then that space should still exist in the bookmark's label before the second component.

For instance, this puts some content in h1:before pseudo-elements:

<!DOCTYPE html><title>Bookmark with Space</title>
<style>
#s:before { content: '1. '   }
#n:before { content: '2.\a0' }
#x:before { content: '3.'    }
h1        { bookmark-label: content(before) content(text) }
</style>

<h1 id=s>Space</h1>
<h1 id=n>Non-Breaking Space</h1>
<h1 id=x>Nothing</h1>

The first heading in the document renders as expected: “1. Space”. But in the PDF index, it's “1.Space”, without the space. And the second heading shows that a trailing non-breaking space also goes missing.

bookmark_space

Discovered in WeasyPrint 43; I haven't tried older versions. Kind-of seems like the opposite issue to #607.

@liZe
Copy link
Member

liZe commented Nov 15, 2018

Yes, that's actually a duplicate of #607. I've changed #607's title to be less specific.

@liZe liZe closed this as completed Nov 15, 2018
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