Skip to content

Commit

Permalink
Small refactor doc gen
Browse files Browse the repository at this point in the history
  • Loading branch information
notomo committed May 15, 2024
1 parent 817aa16 commit 1ee1e39
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions spec/lua/cmdbuf/doc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ CmdbufNew *cmdbuf.nvim-CmdbufNew*
})

local gen_readme = function()
local f = io.open(example_path, "r")
local exmaple = f:read("*a")
f:close()
local exmaple = util.read_all(example_path)

local content = ([[
# cmdbuf.nvim
Expand All @@ -65,8 +63,6 @@ This plugin provides command-line window functions by normal buffer and window.
```lua
%s```]]):format(exmaple)

local readme = io.open("README.md", "w")
readme:write(content)
readme:close()
util.write("README.md", content)
end
gen_readme()

0 comments on commit 1ee1e39

Please sign in to comment.