wiki icon indicating copy to clipboard operation
wiki copied to clipboard

fix: Issue #1496 Code block does not wrap text when printing

Open oliveiradouglas opened this issue 1 year ago • 6 comments

Issue reference: https://github.com/requarks/wiki/issues/1496

Fix Printscreen:

Screenshot 2024-06-18 at 13 34 52

oliveiradouglas avatar Jun 18 '24 16:06 oliveiradouglas

@oliveiradouglas Does this PR fix this issue as well? Looks Similar

https://github.com/requarks/wiki/discussions/6759

aapwikip avatar Jun 22 '24 12:06 aapwikip

@wikiaap yes, look:

Before the fix, the code block was cut:

Screenshot 2024-06-23 at 08 34 56

After fix, the code block respects page width and wraps the text:

Screenshot 2024-06-18 at 13 34 52

oliveiradouglas avatar Jun 23 '24 11:06 oliveiradouglas

@oliveiradouglas what if there are no white spaces e.g. a website link as shows in the given issue? #6789

aapwikip avatar Jul 04 '24 06:07 aapwikip

Hello,Really it not worked, any suggestion?Sds,Douglas Oliveira.On 4 Jul 2024, at 03:50, wikiaap @.***> wrote: @oliveiradouglas what if there are no white spaces e.g. a website link as shows in the given issue? #6789

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

oliveiradouglas avatar Jul 26 '24 11:07 oliveiradouglas

Issue reference: #1496

Fix Printscreen:

Screenshot 2024-06-18 at 13 34 52

If you want the PR to include the issue it closes, add the following to your initial comment:

closes #1496

This will add a link to the issue in the sidebar in the Development section

BPowell76 avatar Nov 18 '24 01:11 BPowell76

add these lines at this position, can wrap texts with no white spaces when printing.

    .prismjs{
      box-shadow: none;
      background-color: #FFF;

      /*  add these lines */
      white-space: pre-wrap !important; 
      word-wrap: break-word !important;
      overflow-wrap: break-word !important;

      @at-root .theme--dark & {
        background-color: #FFF;
      }

      > code {
        color: #000;
        box-shadow: none;
        text-shadow: none;

        /*  add these lines */
        white-space: pre-wrap !important; 
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
      }
    }

@oliveiradouglas what if there are no white spaces e.g. a website link as shows in the given issue? #6789

zha0jf avatar Apr 21 '25 07:04 zha0jf