From db64eeb9bc128682e077217cc1d8830cfc10d88f Mon Sep 17 00:00:00 2001 From: ubq323 Date: Tue, 10 Jun 2025 19:58:38 +0100 Subject: beginning to realize some limitations of garkup5... --- init.lua | 6 ++++++ prose.lua | 2 ++ 2 files changed, 8 insertions(+) diff --git a/init.lua b/init.lua index dbf37bc..f57c63e 100644 --- a/init.lua +++ b/init.lua @@ -54,11 +54,17 @@ local function mode_hr(S) S:emit(html.T.hr"") end +-- bad! bad! bad! +local function mode_insect(S) S:line() S:emit(html.safe"
") end +local function mode_unsect(S) S:line() S:emit(html.safe"
") end + local mode_patterns = { { "^```", mode_code }, { "^*", mode_list }, { "^#", mode_heading }, { "^%-%-%-", mode_hr }, + { "^<<", mode_insect }, + { "^>>", mode_unsect }, } local function match_mode_pattern(S, line) diff --git a/prose.lua b/prose.lua index cada55a..98e9d26 100644 --- a/prose.lua +++ b/prose.lua @@ -119,6 +119,8 @@ extensions.def = function(S,text,name) extensions[name]=fn() end +extensions.raw = function(S,text) return html.safe(text) end + setmetatable(extensions, {__index = function(t, k) return function(S, text) io.stderr:write("warning: unknown extension "..k.."\n") -- cgit v1.2.3