Initial vibecoded proof of concept

This commit is contained in:
Alex Selimov 2025-10-05 20:16:33 -04:00
parent 74812459af
commit 461318a656
Signed by: aselimov
GPG key ID: 3DDB9C3E023F1F31
61 changed files with 13306 additions and 0 deletions

28
lua/notex/document.lua Normal file
View file

@ -0,0 +1,28 @@
-- lua/notex/document.lua
local lyaml = require("lyaml")
local M = {}
function M.parse(file_content)
local yaml_part, content_part = file_content:match("\n?^---\n(.-?)\n---\n(.*)")
if not yaml_part then
return {
type = "note",
properties = {},
content = file_content,
}
end
local properties = lyaml.load(yaml_part)
local doc_type = properties.type or "note"
properties.type = nil
return {
type = doc_type,
properties = properties,
content = content_part,
}
end
return M