The thing is. I keep in the database of the article. For some of them I use MarkDown. Here is a piece of the article in the editor (MarkDown markup):
What should be here - ```shell opens a block of code. Everything inside is wrapped around the output in the <pre class="lang-shell"> ... </pre> block. Then, after loading, the page is processed by the Highlight.js library to highlight the syntax. But the problem is that inside the pre blocks (and ONLY in them! Everything is fine in other places) the transfers are mysteriously lost. This is in the editor (simple <textarea> field):
There are transfers. Next, look at the page:
No transfers. At all. From the word "absolutely." Now we take and display the contents of $post->body not into the template, but simply through var_dump() :
Then we will see the following:
At first I thought it was an oddity template. Crawled into the cache, but there all that it does is simply translate the templating directives into PHP functions. $post->body , in particular, it outputs as follows:
That is, no additional filters, trim() s and other things. Just prints. But hyphenation in the code disappear. Which way to look? Thank.
PS The project is built on the Phalcon PHP Framework, the base MongoDB 3.4, PHP 7.0 PPS The Highlight.js library has nothing to do with it. The problem was even before its implementation, and when you turn off the library is saved.





