Skip to content

Conversation

@paris3200
Copy link
Owner

Summary

  • Fixes tag search parser to support YAML list format for frontmatter tags
  • Previously only supported bracket format tags: [tag1, tag2] causing "No tags found in frontmatter" errors for notes using standard YAML list format
  • Parser now handles both bracket format and multi-line YAML list format (tags:\n - tag1\n - tag2)

Changes

Updated lua/markdown-notes/notes.lua frontmatter parsing logic to:

  • Detect when tags: line is not in bracket format
  • Enter "list mode" to process subsequent lines starting with -
  • Extract tags from YAML list items until hitting non-list content or end of frontmatter

Test Plan

  • Tested parser with YAML list format: tags:\n - tag1\n - tag2
  • Tested parser with bracket format: tags: [tag1, tag2]
  • Tested parser with empty tags: tags: []
  • Verified tag search works with existing notes using YAML list format

The tag search parser previously only supported bracket format
tags: [tag1, tag2] but failed to parse the standard YAML list
format with tags on separate lines (tags:\n  - tag1). This caused
"No tags found in frontmatter" errors for notes using list format.

Updated parser to handle both formats:
- Bracket format: tags: [tag1, tag2, tag3]
- YAML list format: tags:\n  - tag1\n  - tag2

Parser now enters list mode when tags: line is not in bracket
format and processes subsequent lines starting with - until
hitting a non-list item or end of frontmatter section.
@paris3200 paris3200 merged commit bdc799f into main Nov 18, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants