srchub-old

srchub-old Commit Details


Date:2014-03-13 22:46:00 (10 years 9 months ago)
Author:Natalie Adams
Branch:default
Commit:7d92c7ed8bd9
Parents: 913d86aa4ab2
Message:Adding some extension mapping to FileUtil

Fixing wiki page update preview
Changes:
Mindefero/src/IDF/FileUtil.php (3 diffs)
Mindefero/src/IDF/templates/idf/wiki/updatePage.html (1 diff)

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

Tags

Page rendered in 0.41866s using 14 queries.