diff --git a/README.md b/README.md index 7cb2696..d27a341 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ require('telekasten').setup({ -- image link style -- wiki: ![[image name]] - -- markdown: ![image name](image_subdir/xxxxx.png) + -- markdown: ![](image_subdir/xxxxx.png) image_link_style = "wiki", -- integrate with calendar-vim @@ -129,7 +129,7 @@ END | `image_subdir` | sub-directory where pasted images should go | img | | | set to nil if pasted images shouldn't go into a special subdir | img | | `image_link_style` | style of img links inserted when pasting images from clipboard | wiki | -| | `markdown` ... `![image name](image_subdir/xxxxx.png)` | | +| | `markdown` ... `![](image_subdir/xxxxx.png)` | | | | `wiki` ... `![[image name]]` | | | `extension` | filename extension of your note files | .md | | `follow_creates_nonexisting` | following a link to a non-existing note will create it | true | diff --git a/doc/telekasten.txt b/doc/telekasten.txt index 2dd1bce..bff8322 100644 --- a/doc/telekasten.txt +++ b/doc/telekasten.txt @@ -74,7 +74,7 @@ telekasten.setup({opts}) -- image link style", -- wiki: ![[image name]] - -- markdown: ![image name](image_subdir/xxxxx.png) + -- markdown: ![](image_subdir/xxxxx.png) image_link_style = "wiki", @@ -152,7 +152,7 @@ telekasten.setup({opts}) Valid options are: - 'wiki' .. places links like this: `![[image_name]]` - - 'markdown' .. `![image_name](image_subdir/image_name)` + - 'markdown' .. `![](image_subdir/image_name)` Default: 'wiki' diff --git a/lua/telekasten.lua b/lua/telekasten.lua index d3419fd..fb2f844 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -40,7 +40,7 @@ local ZkCfg = { -- image link style -- wiki: ![[image name]] - -- markdown: ![image name](image_subdir/xxxxx.png) + -- markdown: ![](image_subdir/xxxxx.png) image_link_style = "wiki", -- integrate with calendar-vim @@ -117,7 +117,7 @@ local imgFromClipboard = function() os.execute("xclip -selection clipboard -t image/png -o > " .. pngpath) if file_exists(pngpath) then if ZkCfg.image_link_style == "markdown" then - vim.api.nvim_put({ "![" .. pngname .. "](" .. relpath .. "]" }, "", false, true) + vim.api.nvim_put({ "![](" .. relpath .. "]" }, "", false, true) else vim.api.nvim_put({ "![[" .. pngname .. "]]" }, "", false, true) end