mirror of
https://github.com/friendica/friendica
synced 2025-04-24 03:10:11 +00:00
Remove text highlighting from BBCode::convert
- Move code blocks escaping from BBCode::toMarkdown to BBCode::convert - Use "language-" class prefix for expected syntax highlighting
This commit is contained in:
parent
79d36b932b
commit
d6adcb9734
3 changed files with 30 additions and 35 deletions
|
@ -122,7 +122,7 @@ class HTML
|
|||
// Removing code blocks before the whitespace removal processing below
|
||||
$codeblocks = [];
|
||||
$message = preg_replace_callback(
|
||||
'#<pre><code(?: class="([^"]*)")?>(.*)</code></pre>#iUs',
|
||||
'#<pre><code(?: class="language-([^"]*)")?>(.*)</code></pre>#iUs',
|
||||
function ($matches) use (&$codeblocks) {
|
||||
$return = '[codeblock-' . count($codeblocks) . ']';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue