Support code blocks with language in markdown and html.

This commit is contained in:
Harald Eilertsen
2024-02-08 10:00:12 +01:00
parent 86e953f495
commit 19ae8cfdfc
2 changed files with 5 additions and 0 deletions

View File

@@ -238,6 +238,7 @@ function html2bbcode($message)
node2bbcode($doc, 'audio', array('src'=>'/(.+)/'), '[audio]$1', '[/audio]');
// node2bbcode($doc, 'iframe', array('src'=>'/(.+)/'), '[iframe]$1', '[/iframe]');
node2bbcode($doc, 'code', array('class'=>'/(.+)/'), '[code=$1]', '[/code]');
node2bbcode($doc, 'code', array(), '[code]', '[/code]');
$message = $doc->saveHTML();