diff --git a/core/file_handling/frontmatter_parser.go b/core/file_handling/frontmatter_parser.go index 1216b36..907725d 100644 --- a/core/file_handling/frontmatter_parser.go +++ b/core/file_handling/frontmatter_parser.go @@ -1,9 +1,8 @@ -package filehandling +package filehandling import ( "bytes" "errors" - "log/slog" "gopkg.in/yaml.v3" ) @@ -21,7 +20,6 @@ func ParseTags(file []byte) ([]string, error) { if err != nil { return nil, err } - slog.Debug("parsed front matter", "fm", fm) return fm.Tags, nil } @@ -36,7 +34,6 @@ func parseFrontMatter(file []byte) (*FrontMatter, error) { if idx := bytes.Index(content, []byte("---")); idx != -1 { content = bytes.TrimSpace(content[:idx]) } - slog.Debug("yaml content to parse", "content", string(content)) var fm FrontMatter if err := yaml.Unmarshal(content, &fm); err != nil { diff --git a/core/handlers/create_note_handler.go b/core/handlers/create_note_handler.go index 416d818..1afb76b 100644 --- a/core/handlers/create_note_handler.go +++ b/core/handlers/create_note_handler.go @@ -7,7 +7,6 @@ import ( filehandling "github.com/KristianJBorgwarth/dendrite.daemon/core/file_handling" "github.com/KristianJBorgwarth/dendrite.daemon/core/models" - "github.com/KristianJBorgwarth/dendrite.daemon/core/template" "github.com/KristianJBorgwarth/dendrite.daemon/core/utils" "github.com/KristianJBorgwarth/dendrite.daemon/persistence/repositories" "github.com/KristianJBorgwarth/dendrite.daemon/persistence/store" @@ -43,7 +42,7 @@ func (h *CreateNoteHandler) Handle(ctx context.Context, raw json.RawMessage) (an notePath := filepath.Join(store.GetVaultStore().Config.VaultPath(), cmd.Directory, slug+".md") - data, err := template.RenderTemplate(templatePath, cmd.Title, slug) + data, err := filehandling.RenderTemplate(templatePath, cmd.Title, slug) if err != nil { return nil, err }