From: <var...@us...> - 2012-11-28 10:16:25
|
Revision: 8567 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8567&view=rev Author: vargenau Date: 2012-11-28 10:16:18 +0000 (Wed, 28 Nov 2012) Log Message: ----------- Reformat code Modified Paths: -------------- trunk/lib/plugin/SyntaxHighlighter.php Modified: trunk/lib/plugin/SyntaxHighlighter.php =================================================================== --- trunk/lib/plugin/SyntaxHighlighter.php 2012-11-28 10:07:18 UTC (rev 8566) +++ trunk/lib/plugin/SyntaxHighlighter.php 2012-11-28 10:16:18 UTC (rev 8567) @@ -115,39 +115,38 @@ if (empty($syntax)) { return $this->error(sprintf(_("A required argument '%s' is missing."), 'syntax')); } - if (!empty($source)) { - $args = ""; - if (defined('HIGHLIGHT_DATA_DIR')) { - $args .= " --data-dir " . HIGHLIGHT_DATA_DIR; - } - if ($number != 0) { - $args .= " -l"; - } - if ($wrap != 0) { - $args .= " -V"; - } - $html = HTML(); - if (!empty($color) and !preg_match('/^[\w-]+$/', $color)) { - $html->pushContent($this->error(fmt("invalid %s ignored", 'color'))); - $color = false; - } - if (!empty($color)) { - $args .= " --style $color --inline-css"; - } - if (!empty($style)) { - $args .= " -F $style"; - } - $commandLine = HIGHLIGHT_EXE . "$args -q -X -f -S $syntax"; - $code = $this->newFilterThroughCmd($source, $commandLine); - if (empty($code)) { - return $this->error(fmt("Couldn't start commandline '%s'", $commandLine)); - } - $pre = HTML::pre(HTML::raw($code)); - $html->pushContent($pre); - return HTML($html); - } else { + if (empty($source)) { return $this->error(fmt("empty source")); } + $args = ""; + if (defined('HIGHLIGHT_DATA_DIR')) { + $args .= " --data-dir " . HIGHLIGHT_DATA_DIR; + } + if ($number != 0) { + $args .= " -l"; + } + if ($wrap != 0) { + $args .= " -V"; + } + $html = HTML(); + if (!empty($color) and !preg_match('/^[\w-]+$/', $color)) { + $html->pushContent($this->error(fmt("invalid %s ignored", 'color'))); + $color = false; + } + if (!empty($color)) { + $args .= " --style $color --inline-css"; + } + if (!empty($style)) { + $args .= " -F $style"; + } + $commandLine = HIGHLIGHT_EXE . "$args -q -X -f -S $syntax"; + $code = $this->newFilterThroughCmd($source, $commandLine); + if (empty($code)) { + return $this->error(fmt("Couldn't start commandline '%s'", $commandLine)); + } + $pre = HTML::pre(HTML::raw($code)); + $html->pushContent($pre); + return HTML($html); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |