GitHub-code-wrap icon indicating copy to clipboard operation
GitHub-code-wrap copied to clipboard

It should be white-space: pre-line not white-space: pre-wrap

Open charlesr1971 opened this issue 2 years ago • 2 comments

When I use the default CSS, using the Stylus extension, the lines are not wrapped, but after editing:

body:not(.nowrap) .blob-code-inner,
 body:not(.nowrap) .markdown-body pre > code,
 body:not(.nowrap) .markdown-body .highlight > pre {
   white-space: pre-wrap !important;
   word-break: break-all !important;
   overflow-wrap: break-word !important;
   display: block !important;
 }

To:

 body:not(.nowrap) .blob-code-inner,
  body:not(.nowrap) .markdown-body pre > code,
  body:not(.nowrap) .markdown-body .highlight > pre {
    white-space: pre-line !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    display: block !important;
  }

Word wrapping occurs correctly

  • Browser: Firefox 107.0.1 (64-bit)
  • Operating System: Windows 10 Home [Version: 21H2]
  • Link to page with the issue: https://github.com/charlesr1971/cfspreadsheet-lucee-5/blob/master/lar/org/cfpoi/spreadsheet/Spreadsheet.cfc
  • Screenshot:

charlesr1971 avatar Dec 08 '22 18:12 charlesr1971

Switching to pre-line removes the tab indention

toggle

Mottie avatar Dec 09 '22 23:12 Mottie

Maybe we can actually remove altering white-space altogether.

silverwind avatar Mar 19 '23 21:03 silverwind