Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • pagedjs pagedjs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 202
    • Issues 202
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pagedjs
  • pagedjspagedjs
  • Issues
  • #380

Closed
Open
Created Jun 21, 2022 by David Mulder@DavidMulder0

<pre> across page break issues (TextNodes are not 'transferred')

Another MVE of stuff completely breaking down. In this case there is a <pre> that spans two pages... but it only breaks if there is a header on the first page.

<!DOCTYPE html>
<html>
    <head>
        <title>test</title>

        <script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>

        <style>
            html body {
                font-size: 16px;
            }

            html body pre {
                overflow: auto;
                line-height: 1.45;
                background: lightgray;
            }
            .content {
                height: 100%;
            }
            .pagebreak {
                page-break-before: always;
            }
            html body .content {
                padding: 2em calc(50% - 457px + 2em);
            }
        </style>
    </head>
    <body>
        <div class="mume content">
            <h1>Not sure why this header is needed</h1>
            <p>But without this header it won't break</p>
            <div class="pagebreak"></div>

            <pre>
This is where the &lt;pre&gt; tag starts
What follows is a bunch of empty lines (why is this on another page?)




































// notice that the TextNodes between the spans below have been 'lost'
<span>A</span> <span>B</span> <span>C</span>
</pre
            >
        </div>
    </body>
</html>

And only just noticed that when printing the last lines miss completely... mve3.pdf

Assignee
Assign to
Time tracking