summaryrefslogtreecommitdiff
path: root/prose.lua
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-11-02 03:40:44 +0000
committerubq323 <ubq323@ubq323.website>2024-11-02 03:40:44 +0000
commit088039da231b705a59e07373bd74eb048eb86f4c (patch)
treec4d5a67628caea10f841dc9777f47a663d0ddd24 /prose.lua
parentc7be2a9fa9a457664e85af4a47602ed4f9a1f83b (diff)
don"t explode on unknown extension
Diffstat (limited to 'prose.lua')
-rw-r--r--prose.lua7
1 files changed, 7 insertions, 0 deletions
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
+