function _syntaxhighlighter_do_filter_process in Syntax Highlighter 6.2
Same name and namespace in other branches
- 6 syntaxhighlighter.module \_syntaxhighlighter_do_filter_process()
- 7.2 syntaxhighlighter.module \_syntaxhighlighter_do_filter_process()
- 7 syntaxhighlighter.module \_syntaxhighlighter_do_filter_process()
Revert back to <pre> tag
1 call to _syntaxhighlighter_do_filter_process()
- syntaxhighlighter_filter in ./
syntaxhighlighter.module - Implements hook_filter()
File
- ./
syntaxhighlighter.module, line 332 - Syntax highlight code using the Syntaxhighlighter javascript library. See http://alexgorbatchev.com/wiki/SyntaxHighlighter
Code
function _syntaxhighlighter_do_filter_process($text) {
$patterns = array(
'#{' . SYNTAXHIGHLGHTER_TAG_STRING . ' ([^}]+)}#',
'#{/' . SYNTAXHIGHLGHTER_TAG_STRING . '}#',
);
$tag_name = variable_get('syntaxhighlighter_tagname', 'pre');
$replacements = array(
"<{$tag_name} \$1>",
"</{$tag_name}>",
);
return preg_replace($patterns, $replacements, $text);
}