diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2025-04-02 08:26:54 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2025-04-02 08:26:54 -0400 |
commit | 5c42cea89b8aa6a6a58c204e70e94a9aefcfb4ed (patch) | |
tree | 01bb657d578427bbe0410d6f900a478fc4cceed1 /lua/rafta.lua | |
parent | eed913409a070100d6a5d6792d81464c66dd0f6d (diff) |
Readme and drafts
Diffstat (limited to 'lua/rafta.lua')
-rw-r--r-- | lua/rafta.lua | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/lua/rafta.lua b/lua/rafta.lua deleted file mode 100644 index b3483a4..0000000 --- a/lua/rafta.lua +++ /dev/null @@ -1,39 +0,0 @@ -local M = {} - -M.setup = function() - -- nothing -end - ----@class rafta.Slides ----@fields slides string[]: The slides of the file - ---- Takes some lines and parses them ----@param lines string[]: The lines in the buffer ----@return rafta.Slides -local parse_slides = function(lines) - local current_slide = {} - local sep = "^#" - - local slides = { slides = {} } - for _, line in ipairs(lines) do - print(line, "find:", line:find(sep), "|") - if line:find(sep) then - if #current_slide > 0 then - table.insert(slides.slides, current_slide) - end - current_slide = {} - end - table.insert(current_slide, line) - end - table.insert(slides.slides, current_slide) - return slides -end - -vim.print(parse_slides({ - "# Hello", - "this is something else", - "# World", - "this is another thing", -})) - -return M |