Fix highlighting for ASP and ActionScript

This commit is contained in:
Simon Vieille 2017-10-15 12:40:52 +02:00
parent 37751f51a6
commit d56c33c29f
3 changed files with 6 additions and 4 deletions

View File

@ -45,14 +45,16 @@ class Gist extends BaseGist
}
/**
* Returns the type for Geshi.
* Returns the type for highlighting.
*
* @return string
*/
public function getGeshiType()
public function getHighlightType()
{
$data = array(
'html' => 'xml',
'asp' => 'aspnet',
'actionscript3' => 'actionscript',
);
return str_replace(array_keys($data), array_values($data), $this->getType());

View File

@ -65,7 +65,7 @@
<div class="tab-content">
<div id="view" class="tab-pane active in">
<div id="viewer">
<pre><code {% if gist.cipher %}data-cipher{% endif %} class="language-{{ gist.type }}">{{ raw_content }}</code></pre>
<pre><code {% if gist.cipher %}data-cipher{% endif %} class="language-{{ gist.highlightType }}">{{ raw_content }}</code></pre>
</div>
</div>
</div>

View File

@ -62,7 +62,7 @@
<div class="tab-content">
<div id="view" class="tab-pane active in">
<div id="viewer">
<pre><code {% if gist.cipher %}data-cipher{% endif %} class="language-{{ gist.type }}" data-dependencies="{{ gist.type }}">{{ raw_content }}</code></pre>
<pre><code {% if gist.cipher %}data-cipher{% endif %} class="language-{{ gist.highlightType }}">{{ raw_content }}</code></pre>
</div>
</div>
</div>