git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update 0.5.0 changelog
[phorkie.git]
/
src
/
phorkie
/
Renderer
/
Geshi.php
diff --git
a/src/phorkie/Renderer/Geshi.php
b/src/phorkie/Renderer/Geshi.php
index 08c6c74d29e30c419e89ec84f8b317163d4f3ab4..2b3854a59d60f746ee5ebe0148ba1be209b7322d 100644
(file)
--- a/
src/phorkie/Renderer/Geshi.php
+++ b/
src/phorkie/Renderer/Geshi.php
@@
-15,21
+15,25
@@
class Renderer_Geshi
{
/**
* Yes, geshi needs to be in your include path
{
/**
* Yes, geshi needs to be in your include path
- * We use the
mediawiki geshi extension
package.
+ * We use the
geshi pear
package.
*/
*/
- if (!class_exists('\\
GeSH
i', true)) {
+ if (!class_exists('\\
gesh
i', true)) {
require_once $GLOBALS['phorkie']['cfg']['geshi'];
}
require_once $GLOBALS['phorkie']['cfg']['geshi'];
}
- $geshi = new \
GeSH
i($file->getContent(), $this->getType($file));
+ $geshi = new \
gesh
i($file->getContent(), $this->getType($file));
$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
- $geshi->set_header_type(GESHI_HEADER_DIV);
+ $geshi->set_header_type(GESHI_HEADER_PRE_TABLE);
+ $geshi->enable_classes();
+ $geshi->set_line_style('color: #DDD;');
if ($res !== null) {
$geshi->highlight_lines_extra(array_keys($res->annotations));
$geshi->set_highlight_lines_extra_style('background-color: #F2DEDE');
}
if ($res !== null) {
$geshi->highlight_lines_extra(array_keys($res->annotations));
$geshi->set_highlight_lines_extra_style('background-color: #F2DEDE');
}
- return '<div class="code">'
+ return '<style type="text/css">'
+ . $geshi->get_stylesheet() . '</style>'
+ . '<div class="code">'
. str_replace(' ', ' ', $geshi->parse_code())
. '</div>';
}
. str_replace(' ', ' ', $geshi->parse_code())
. '</div>';
}