Closed yazpower closed 1 year ago
Thanks for the report and suggestion!
It looks OK, as I understand all <br>
tags that we want to display are turned into HTML entities and not replaced by the code. We probably need to adjust the replace pattern to match <br />
as well, though.
Would you be willing to submit a Pull Request?
Here is the pull request 👍
Fixed in https://github.com/Qeole/Enlight/pull/19.
When I apply the highlighter in https://\*.packtpub.com/* page I get this result:
here is the html block before the highlight:
after:
The probleme come from the fact that the
<code>
tag containt<br>
. A simple fix would be to retrieve all the element that match the markup "language" and apply areplace(/<br>/g,'\n')
.A simple example to illustrate a potential fix:
Would it be possible to add this feature ?