From c7d9efdb19b650733f19176e11389e865ee92272 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 28 Nov 2024 11:44:39 +0000 Subject: use lua-run for shelling out to highlight --- init.lua | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 801f9d2..6f09cb8 100644 --- a/init.lua +++ b/init.lua @@ -3,16 +3,11 @@ local T = html.T local prose = require'garkup.prose' local function highlight(code, lang) - -- you'd better not already be using that file - local infile = assert(io.open("/tmp/highlighter_input","w")) - assert(infile:write(code)) - local outhandle = assert(io.popen("highlight -f -S "..lang.." --inline-css --enclose-pre