Fix unused variables and useless pending test
This commit is contained in:
parent
5a0a258658
commit
e4e6fca765
5 changed files with 4 additions and 7 deletions
|
@ -10,7 +10,7 @@ local action = require 'zettelkasten.action'
|
|||
-- table.
|
||||
-- Recurses into subdirectories if recursive argument is true.
|
||||
function ZK.get_zettel_list(path, recursive)
|
||||
return ls.get_anchors_and_paths(path, recursive or false, ZK.options)
|
||||
return ls.get_anchors_and_paths(path, recursive or false)
|
||||
end
|
||||
|
||||
-- Return a valid zettelkasten anchor for the current time,
|
||||
|
|
|
@ -53,7 +53,8 @@ function L.create(anchor, text, style)
|
|||
return parsers[style].style_func(anchor, text, o.zettel().extension)
|
||||
end
|
||||
|
||||
-- Returns a correctly formatted link to a new zettel (without anchor).
|
||||
-- Returns a correctly formatted link to a new zettel (a zettel which does not
|
||||
-- possess an anchor yet).
|
||||
-- Takes an optional link text which will be added to the link.
|
||||
-- Takes an optional style according to which the link will be transformed.
|
||||
function L.new(text, style)
|
||||
|
|
|
@ -13,7 +13,6 @@ local function cleanPath(path)
|
|||
end
|
||||
|
||||
-- TODO transform paths:
|
||||
-- * to absolute value (e.g. ~ to home, scandir needs absolute)
|
||||
-- * to ensure / at the end (or no /) gets taken into account
|
||||
function ls.get_anchors_and_paths(path, recursive)
|
||||
-- TODO check for duplicates and warn user
|
||||
|
|
|
@ -136,9 +136,6 @@ describe("get_anchors_and_paths", function()
|
|||
ls.get_anchors_and_paths('mydirectory', false, vim.g))
|
||||
|
||||
end)
|
||||
|
||||
it("should default to the zettel root dir",
|
||||
function() pending("not implemented") end)
|
||||
end)
|
||||
|
||||
describe("get_zettel", function()
|
||||
|
|
|
@ -42,7 +42,7 @@ end
|
|||
local function get_options(defaults)
|
||||
local options = {}
|
||||
local def = defaults
|
||||
for opt, v in pairs(def) do
|
||||
for opt, _ in pairs(def) do
|
||||
|
||||
-- check for vim options set (globally or buffer), otherwise use default value
|
||||
options[opt] = vim.g[def[opt].vimname] or vim.b[def[opt].vimname] or
|
||||
|
|
Loading…
Reference in a new issue