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

Support for white-space: pre-wrap #1243

Open
layandreas opened this issue May 7, 2024 · 1 comment
Open

Support for white-space: pre-wrap #1243

layandreas opened this issue May 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@layandreas
Copy link

layandreas commented May 7, 2024

Use case

Thanks for putting your effort into this package, I really like it so far! I have one issue so far:

pre-wrapping lines via "white-space: pre-wrap" currently does not work. I want to use it for pre-wrapping lines in a preformatted code section:

<pre style="white-space: pre-wrap;"><code>  #!&#x2F;bin&#x2F;bash

  # Add this script to cron to run at whatever duration you desire.

  # URL to be checked
  URL=&quot;https:&#x2F;&#x2F;example.com&#x2F;test.php&quot;

  # Email for alerts
  EMAIL=&quot;[email protected]&quot;

  # Perform the HTTP request and extract the status code with 10 second timeout.
  STATUS=$(curl -o &#x2F;dev&#x2F;null -s -w &quot;%{http_code}\n&quot; --max-time 10 $URL)

  # Check if the status code is not 200
  if [ &quot;$STATUS&quot; -ne 200 ]; then
      # Send email alert
      echo &quot;The URL $URL did not return a 200 status code. Status was $STATUS.&quot; | mail -s &quot;URL Check Alert&quot; $EMAIL

      # Instead of email, you could send a Slack&#x2F;Teams&#x2F;PagerDuty&#x2F;Pushover&#x2F;etc, etc alert, with something like:
      curl -X POST https:&#x2F;&#x2F;events.pagerduty.com&#x2F;...
  fi
</code></pre>

Proposal

Support for white-space: pre-wrap.

@layandreas layandreas added the enhancement New feature or request label May 7, 2024
@daohoangson
Copy link
Owner

Thank you for the feature request. This is working as expected, only pre/normal/nowrap are supported for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants