Skip to content

Commit

Permalink
Fix syntax highlighting on web for PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Nov 12, 2024
1 parent 30518ca commit c21a5fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions llamafile/server/www/highlight_html.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,4 @@ Highlighter.REGISTRY['html'] = HighlightHtml;
Highlighter.REGISTRY['htm'] = HighlightHtml;
Highlighter.REGISTRY['xhtml'] = HighlightHtml;
Highlighter.REGISTRY['xml'] = HighlightHtml;
Highlighter.REGISTRY['php'] = HighlightHtml;
3 changes: 0 additions & 3 deletions llamafile/server/www/highlight_php.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,3 @@ class HighlightPhp extends Highlighter {
this.delta = 1;
}
}

Highlighter.REGISTRY['php'] = HighlightPhp;
Highlighter.REGISTRY['pl'] = HighlightPhp;
6 changes: 3 additions & 3 deletions llamafile/server/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ <h1><img src="chatbot.png" alt="[logo]" width="64" height="64"> llamafile</h1>
<script src="highlight_basic.js"></script>
<script src="highlight_cobol.js"></script>
<script src="highlight_csharp.js"></script>
<script src="highlight_css.js"></script>
<script src="highlight_forth.js"></script>
<script src="highlight_fortran.js"></script>
<script src="highlight_go.js"></script>
<script src="highlight_haskell.js"></script>
<script src="highlight_js.js"></script>
<script src="highlight_css.js"></script>
<script src="highlight_php.js"></script>
<script src="highlight_html.js"></script>
<script src="highlight_java.js"></script>
<script src="highlight_js.js"></script>
<script src="highlight_julia.js"></script>
<script src="highlight_kotlin.js"></script>
<script src="highlight_ld.js"></script>
Expand All @@ -55,7 +56,6 @@ <h1><img src="chatbot.png" alt="[logo]" width="64" height="64"> llamafile</h1>
<script src="highlight_ocaml.js"></script>
<script src="highlight_pascal.js"></script>
<script src="highlight_perl.js"></script>
<script src="highlight_php.js"></script>
<script src="highlight_python.js"></script>
<script src="highlight_r.js"></script>
<script src="highlight_ruby.js"></script>
Expand Down

0 comments on commit c21a5fc

Please sign in to comment.