aboutsummaryrefslogtreecommitdiffstats
path: root/include/html2bbcode.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-02-08 10:00:12 +0100
committerHarald Eilertsen <haraldei@anduin.net>2024-02-08 10:00:12 +0100
commit19ae8cfdfc27578a5f4660993702320ad1e5fac0 (patch)
tree9f05b9cb3799c6adad27bdf18aac5329e5e02973 /include/html2bbcode.php
parent86e953f49566a0f4bb2220a8e5f4013044f4a49f (diff)
downloadvolse-hubzilla-19ae8cfdfc27578a5f4660993702320ad1e5fac0.tar.gz
volse-hubzilla-19ae8cfdfc27578a5f4660993702320ad1e5fac0.tar.bz2
volse-hubzilla-19ae8cfdfc27578a5f4660993702320ad1e5fac0.zip
Support code blocks with language in markdown and html.
Diffstat (limited to 'include/html2bbcode.php')
-rw-r--r--include/html2bbcode.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index 71ea68dae..e2fa94326 100644
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -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();