Modify moonscript lexer to get correct syntax highlighting

of interpolated strings
This commit is contained in:
2025-06-16 20:18:05 -07:00
parent dbc71b4c0b
commit d22283905a
8 changed files with 226 additions and 5 deletions

View File

@@ -19,11 +19,11 @@ require(rend).cmd = "pandoc --mathjax >"
-- require(rend).cmd = "pandoc --mathjax -f json >"
-- Insert custom renderer in the first position so it will be preferred
table.insert Site.default_renderers, 1, rend
-- table.insert Site.default_renderers, 1, rend
-- Remove "pygments" plugin because it conflicts with pandoc syntax highlighting
Site.default_plugins = for v in *Site.default_plugins
if v\find "pygments" then continue else v
-- Site.default_plugins = for v in *Site.default_plugins
-- if v\find "pygments" then continue else v
-- from https://github.com/leafo/sitegen/blob/v0.2/spec/sitegen_spec.moon#L9-L18
get_files = (path, prefix=path) ->
@@ -118,8 +118,8 @@ sitegen.create =>
} for path in *files
add "index.html", title: "Catalin Mititiuc"
add "blog.html", title: "Posts", target: "posts/index", template: "blog"
add_all files_from "docs"
-- add "blog.html", title: "Posts", target: "posts/index", template: "blog"
-- add_all files_from "docs"
-- replace post markdown yaml headers with moonscript headers
filter "docs", (body) =>
@@ -129,3 +129,5 @@ sitegen.create =>
moonscript_header
copy "app.css"
-- copy "pygments.css"
copy "moonscript.css"