Break the line

My fired, Ahmed, has published few posts with the WebLogic output. And I'm sure you have seen endless output lines, especially if the system throws an exception. Here is a code block from his last post:

An error occurred during activation of changes, please see the log for details.

[Deployer:149189]An attempt was made to execute the "activate" operation on an application named "mydatasource" that is not currently available. The application may have been created after non-dynamic configuration changes were activated. If so, the operation cannot be performed until the server is restarted so that the application will be available.

So he asked me: "How we can wrap the lines in code blocks?"   I did some search and read a few posts on how PrismJS can address the long lines issue. The solution from the other Ghost users is not as pretty as regular ```code blocks but quite close to it. If your code has long lines, put it into the markdown section and surround with the tags as below.  


<pre class="language-bash"><code style="white-space: pre-wrap; font-size: small">
Your code goes here
</code></pre>

The key is  "white-space: prewrap"  style in the code tag.

I found another caveat during this post preparation: It would be wise to escape HTML and XML code to avoid misinterpretations and tags mismatches. Besides that, it works just fine.

An error occurred during activation of changes, please see the log for details.

[Deployer:149189]An attempt was made to execute the "activate" operation on an application named "mydatasource" that is not currently available. The application may have been created after non-dynamic configuration changes were activated. If so, the operation cannot be performed until the server is restarted so that the application will be available.

I used bash as language, just to show you that you can keep syntax highlight, and do some style manipulations, for example font size.