diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-02-08 10:00:12 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-02-08 10:00:12 +0100 |
commit | 19ae8cfdfc27578a5f4660993702320ad1e5fac0 (patch) | |
tree | 9f05b9cb3799c6adad27bdf18aac5329e5e02973 /include/html2bbcode.php | |
parent | 86e953f49566a0f4bb2220a8e5f4013044f4a49f (diff) | |
download | volse-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.php | 1 |
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(); |