Use prism as smaller nicer code highlighting library

This commit is contained in:
2020-04-27 19:14:44 +02:00
parent bc45040bb1
commit add4a2f7f0
9 changed files with 163 additions and 29 deletions

View File

@@ -1,7 +0,0 @@
document.addEventListener("turbolinks:load", function () {
document.querySelectorAll('pre code').forEach(function (block) {
if (window.hljs) {
hljs.highlightBlock(block);
}
});
});

View File

@@ -13,7 +13,7 @@ require('tinyforms');
require('demo');
require('backend_typed');
require('tabs');
require('highlight');
require('prism');
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)

17
app/javascript/prism.js Normal file

File diff suppressed because one or more lines are too long