From 088039da231b705a59e07373bd74eb048eb86f4c Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 2 Nov 2024 03:40:44 +0000 Subject: don"t explode on unknown extension --- prose.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'prose.lua') diff --git a/prose.lua b/prose.lua index 99e298a..b064826 100644 --- a/prose.lua +++ b/prose.lua @@ -93,5 +93,12 @@ extensions.meta = function(S,text) local fn = assert(load(string.format("return {%s}", text),"meta", "t")) S.meta = fn() end +setmetatable(extensions, {__index = function(t, k) + return function(S, text) + io.stderr:write("warning: unknown extension "..k.."\n") + return text + end +end}) return prose + -- cgit v1.2.3