Forum Bugs

Word-wrap odd behavior on slashes in dates, requiring explicit white-space: nowrap; to prevent wrapping.

theadventmaster
Hello, a customer on DocRaptor Pipeline 8 / PrinceXML 13 discovered a wrapping issue that seems to work just fine in web browsers, but that I couldn't seem to resolve in Prince other than adding wrapper spans in HTML.

Thinking this is a bug. Read this thread as well and didn't see a solution, as the prince-line-break-magic property did not seem to affect output: https://www.princexml.com/forum/topic/1121/support-for-css3-word-wrap

<html>
  <head>
    <style>
      body, body * {
        prince-line-break-magic: none;
      }
      div {
        width: 450px;
        word-break: keep-all;
        margin: 30px auto;
      }
      span.date {
        white-space: nowrap;
      }
    </style>
  </head>
  <body>
    <div>
      This is a test of page wrapping. You will see here the content 1/10/2030 wraps on the slash even though the prince disable line wrap magic has been disabled.
    </div>
    <div>
      This is a test of page wrapping. You will see here the content <span class="date">1/10/2030</span> DOESN'T wrap on the slashes because the white-space: nowrap; is applied specifically to it.
    </div>
  </body>
</html>


Alex,
DocRaptor Support
mikeday
The property name is actually "prince-linebreak-magic", it should warn about it like this:
prince: wrap.html:style:3: warning: unknown property 'prince-line-break-magic'