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 * @return string
*/ */
public function getGeshiType() public function getHighlightType()
{ {
$data = array( $data = array(
'html' => 'xml', 'html' => 'xml',
'asp' => 'aspnet',
'actionscript3' => 'actionscript',
); );
return str_replace(array_keys($data), array_values($data), $this->getType()); return str_replace(array_keys($data), array_values($data), $this->getType());

View file

@ -65,7 +65,7 @@
<div class="tab-content"> <div class="tab-content">
<div id="view" class="tab-pane active in"> <div id="view" class="tab-pane active in">
<div id="viewer"> <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> </div>
</div> </div>

View file

@ -62,7 +62,7 @@
<div class="tab-content"> <div class="tab-content">
<div id="view" class="tab-pane active in"> <div id="view" class="tab-pane active in">
<div id="viewer"> <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> </div>
</div> </div>