From b7ee091288863d03c4bd42db3fade0a2dab8b01c Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Mon, 16 Jun 2025 20:18:05 -0700 Subject: [PATCH] Remove commented-out code in pygments.moon --- pygments.moon | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/pygments.moon b/pygments.moon index 2c49e9f..f9063c9 100644 --- a/pygments.moon +++ b/pygments.moon @@ -7,51 +7,24 @@ CodeBlock: (block) -> cmd = "pygmentize -f html -O style=dracula,wrapcode,classprefix=py- -l %s %s" if block.classes[1] == "moon" or block.classes[1] == "moonscript" - -- p = io.popen ("pygmentize -f html -O style=dracula,wrapcode,classprefix=py- -l moonscript.py %s -x")\format fname p = io.popen (cmd .. " -x")\format "moonscript.py", fname - -- p = io.popen (cmd)\format "moonscript", fname - - -- p = io.open fname out = p\read"*a" p\close! pandoc.RawBlock "html", out - -- pandoc.RawBlock "html", "moonscript" else if block.classes[1] == nil or block.classes[1] == "heex" - -- pandoc.RawBlock "text", block.text - -- require("moon").p [k for k,v in pairs block] - - -- tb = pandoc.RawBlock "html", if block.classes[1] == nil cb = pandoc.CodeBlock(block.text, class: "sourceCode") pandoc.Div cb, class: "sourceCode" else block - -- pandoc.CodeBlock block.text, "text" else status, handle_or_error = pcall -> io.popen (cmd)\format block.classes[1], fname - -- io.open fname sout = handle_or_error\read"*a" - -- handle_or_error\close! if sout\len! == 0 cb = pandoc.CodeBlock(block.text, class: "sourceCode") pandoc.Div cb, class: "sourceCode" else pandoc.RawBlock "html", sout - -- if mat = sout\match('
(.-)\n?
') - -- rep = '
' .. mat .. '
' - -- sout = sout\gsub('
(.-)\n?
', rep) - -- pandoc.RawBlock "html", sout - -- sout = if status then "true" else "false" - -- pandoc.RawBlock "html", sout - - -- if mat = out\match('
(.-)\n?
') - -- rep = '
' .. mat .. '
' - -- out = out\gsub('
(.-)\n?
', rep) - - -- p = io.open fname - -- out = p\read"*a" - -- p\close! - -- pandoc.RawBlock "html", out