diff options
author | Nate Buttke <nate-web@riseup.net> | 2023-07-27 18:11:30 -0700 |
---|---|---|
committer | Nate Buttke <nate-web@riseup.net> | 2023-07-27 18:11:30 -0700 |
commit | 09830af9073e0e1059935627840dcd3f07d81c6f (patch) | |
tree | cfb8b96d526daba52118fba16f8622f9f3b04da9 /frontend | |
parent | 4e9c9aedd8bf5cb3bdee33e5c96477aa6a645260 (diff) |
highlight.js can just guess the language.
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/index.html | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/frontend/index.html b/frontend/index.html index 47060ab..f0284eb 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -74,9 +74,9 @@ } else if(res['loctype'] == "file"){ - leftClass = "language-go" + leftClass = "none" res['text'].forEach((a, i)=>{ - text += '<div class="col-xs-5 code" id="code-'+i+'"><pre><code class="language-go">'+a[0]+'</code></pre></div>' + text += '<div class="col-xs-5 code" id="code-'+i+'"><pre><code class="none">'+a[0]+'</code></pre></div>' text += '<div class="col-xs-5 summary" id="summary-"'+i+'><p>'+a[1]+'</p></div>' }) } @@ -99,7 +99,7 @@ $("#spinny").hide(); text = "" data.forEach((a, i)=>{ - text += '<div class="col-xs-5 code" id="code-'+i+'"><pre><code class="language-go">'+a['blob']+'</code></pre></div>' + text += '<div class="col-xs-5 code" id="code-'+i+'"><pre><code class="none">'+a['blob']+'</code></pre></div>' text += '<div class="col-xs-5 summary" id="summary-"'+i+'><p>'+a['summary']+'</p></div>' }) $("#main").html(text); @@ -127,6 +127,5 @@ }) </script> - <script src="./jsmain.js"></script> </body> </html> |