From 944a735c39a27fc86569c585f2805837b61adb60 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Tue, 2 Aug 2022 20:56:45 +0200 Subject: Slightly tidied up metadata handling --- filters/lib/common.lua | 26 +------------------------- filters/vars.lua | 2 +- 2 files changed, 2 insertions(+), 26 deletions(-) (limited to 'filters') diff --git a/filters/lib/common.lua b/filters/lib/common.lua index 4d44ff3..d6f92e0 100644 --- a/filters/lib/common.lua +++ b/filters/lib/common.lua @@ -12,30 +12,6 @@ function wide(el) return els end -function dump(o) - if type(o) == 'table' then - local s = '{ ' - for k, v in pairs(o) do - if type(k) ~= 'number' then k = '"' .. k .. '"' end - s = s .. '[' .. k .. '] = ' .. dump(v) .. ',' - end - return s .. '} ' - else - return tostring(o) - end -end - -function string.split(str, sep) - sep = sep or '%s' - - local parts = pandoc.List() - - for field, s in str:gmatch("([^" .. sep .. "]*)(" .. sep .. "?)") do - parts:insert(field) - if s == "" then return parts end - end -end - return { - wide = wide, dump = dump + wide = wide } diff --git a/filters/vars.lua b/filters/vars.lua index b0fa66c..99cedc4 100644 --- a/filters/vars.lua +++ b/filters/vars.lua @@ -1,4 +1,4 @@ -local common = require 'filters.lib.common' +local common = require 'scripts.lib.common' local vars = {} -- cgit v1.2.3-54-g00ecf