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

Page Breaks Not Working #28

Closed
deivid77 opened this issue Feb 9, 2024 · 3 comments
Closed

Page Breaks Not Working #28

deivid77 opened this issue Feb 9, 2024 · 3 comments

Comments

@deivid77
Copy link

deivid77 commented Feb 9, 2024

Hello,

I'm experiencing an issue with page breaks when printing Markdown using your stunning Chrome extension.
I'm using the
<div style="page-break-after: always;"></div>
syntax for page breaks, but it seems the extension is not recognizing them during printing.

Maybe the code expects another sintax for page breaks.

Addressing this would make the documents even more beautiful.
Thank you so much.

@jerry1100
Copy link
Owner

Hey Dave, thanks for reporting. Do you mind providing a screenshot to help me understand the issue better?

@deivid77
Copy link
Author

deivid77 commented Feb 9, 2024

Sure!
I hope it helps to clarify.

image
image
image
image

@jerry1100
Copy link
Owner

It seems like GitHub Flavored Markdown doesn't support page breaks - it's being stripped out in the HTML.

Here I'm rendering a page break:
image

But when I inspect the HTML, it's not there:
image

Copilot had this to say:

GitHub applies a sanitization process to all Markdown files, which includes stripping out most HTML tags, including

, for security reasons. This is to prevent cross-site scripting (XSS) attacks. As a result, your page-break-before style is not being applied because the
tag is being removed.

So it seems like it's not possible, despite what some people online are saying. Maybe GitHub removed this functionality recently.

I'm going to close this since it doesn't seem like there's anything we can do, but feel free to reopen if you find something.

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