-
Notifications
You must be signed in to change notification settings - Fork 99
fix: Update YAML frontmatter tag formatting for Obsidian compatibility #280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add dumps_frontmatter_obsidian_compatible() function to format YAML lists properly - Replace frontmatter.dumps() calls with Obsidian-compatible formatter - Update parse_tags() to handle stringified JSON arrays correctly - Add comprehensive tests for YAML formatting and tag parsing - Resolves issue where tags appeared as ["tag1", "tag2"] instead of YAML lists Fixes #132 Co-authored-by: Paul Hernandez <[email protected]>
Signed-off-by: Drew Cain <[email protected]>
@claude take a look at this and see why the build failed. |
Claude finished @groksrc's task —— View job I'll analyze this PR and investigate why the build failed. Todo List:
Analysis:This PR adds Obsidian-compatible YAML formatting for frontmatter tags. I found and fixed the issue in the Issues Found & Fixed:
Fix Applied:I simplified the implementation to use PyYAML's built-in tags:
- system
- overview
- reference instead of: tags: ["system", "overview", "reference"] The fix removes the complex custom YAML dumper class and relies on PyYAML's standard functionality. This should resolve the build failures while maintaining the desired Obsidian compatibility. Commit: 50c7372 - Simplify Obsidian-compatible YAML dumper implementation The build should now pass with this simplified and more robust implementation. |
The original implementation had issues with the custom YAML dumper class: - Unnecessary write_list_item method that didn't return anything - Overcomplicated approach when PyYAML's default_flow_style=False is sufficient - Fixed empty content handling to match test expectations This change simplifies the implementation to use PyYAML's built-in functionality for block-style list formatting, which produces the desired Obsidian-compatible output. Co-authored-by: Drew Cain <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just the method rename
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Co-authored-by: Paul Hernandez <[email protected]> Signed-off-by: Drew Cain <[email protected]>
Fixes #132