srchub

srchub Commit Details


Date:2014-03-13 22:46:25 (10 years 9 months ago)
Author:Natalie Adams
Branch:master
Commit:8a046e3c7e4feca1e868168e6c3dc34a057c42c2
Parents: 0e0b7469d70988ba157a496567822284bece6b08
Message:Adding some extension mapping to FileUtil Fixing wiki page update preview

Changes:

File differences

indefero/src/IDF/FileUtil.php
3838
3939
4040
41
41
4242
4343
4444
......
6363
6464
6565
66
6667
6768
6869
......
8384
8485
8586
86
87
88
8789
8890
8991
'skin', 'sln', 'svc', 'vala', 'vb', 'vbproj', 'vbs', 'wsdl', 'xhtml',
'xml', 'xsd', 'xsl', 'xslt');
public static $map = array("h" => "cpp", "hpp" => "cpp", "rc"=>"text", "sh"=>"bash", "cs"=>"csharp");
public static $map = array("cxx" => "cpp", "h" => "cpp", "hpp" => "cpp", "rc"=>"text", "sh"=>"bash", "cs"=>"csharp");
public static $syntaxhighlightext = array("as3", "cf", "cpp", "c", "css", "pas", "diff", "patch", "erl", "java", "jfx", "js", "pl", "php", "py", "rb", "sass", "scss", "scala", "sql", "vb", );
*/
public static function highLight($fileinfo, $content)
{
$pretty = '';
if (self::isSupportedExtension($fileinfo[2])) {
$pretty = ' prettyprint';
$ext = self::$map[$fileinfo[2]];
else
$ext = "text";
$content = '<script type="syntaxhighlighter" class="brush: ' . $ext . '">' . $content . '</script>';
$content = '<div id="highlight"><script type="syntaxhighlighter" class="brush: ' . $ext . '">' . $content . '</script></div>';
return Pluf_Template::markSafe($content);
}
indefero/src/IDF/templates/idf/wiki/updatePage.html
44
55
66
7
7
88
99
1010
{if $preview}
<h2 id="preview" class="top">{trans 'Preview of the Page'}</h2>
{$preview}
{markdown $preview, $request}
{/if}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.08312s using 14 queries.