From 9226cdcbb789998f6717736ee23a616af55a0313 Mon Sep 17 00:00:00 2001 From: Odin Kroeger Date: Mon, 5 Apr 2021 14:27:00 +0200 Subject: [PATCH] style: Shortened `convert_numbers_to_strings` to `conv_nums_to_strs` and other minor changes. --- pandoc-zotxt.lua | 2 +- test/scripts/unit-tests.lua | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandoc-zotxt.lua b/pandoc-zotxt.lua index cfef413..010d1ad 100644 --- a/pandoc-zotxt.lua +++ b/pandoc-zotxt.lua @@ -349,7 +349,7 @@ end do local read = pandoc.read - local header = '---\n%s\n---' + local header = '---\n%s\n...' function read_yaml_file (fname) local str, err, errno = read_file(fname) diff --git a/test/scripts/unit-tests.lua b/test/scripts/unit-tests.lua index da88e4c..6994267 100644 --- a/test/scripts/unit-tests.lua +++ b/test/scripts/unit-tests.lua @@ -380,11 +380,11 @@ end -- Converters -- ---------- -function test_convert_numbers_to_strings () +function test_conv_nums_to_strs () local a = {} a.a = a - lu.assert_error(M.convert_numbers_to_strings, a) - lu.assert_nil(M.convert_numbers_to_strings()) + lu.assert_error(M.conv_nums_to_strs, a) + lu.assert_nil(M.conv_nums_to_strs()) local tests = { [true] = true, [1] = '1', [1.1] = '1', ['a'] = 'a', [{}] = {}, @@ -398,7 +398,7 @@ function test_convert_numbers_to_strings () } for k, v in pairs(tests) do - lu.assert_equals(M.convert_numbers_to_strings(k), v) + lu.assert_equals(M.conv_nums_to_strs(k), v) end end