Skip to content
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

YAML metadata with string containing hyphen breaks building #544

Open
Tracked by #585
henrikvilhelmberglund opened this issue Oct 14, 2023 · 0 comments · May be fixed by #545
Open
Tracked by #585

YAML metadata with string containing hyphen breaks building #544

henrikvilhelmberglund opened this issue Oct 14, 2023 · 0 comments · May be fixed by #545
Labels
assigned Whether or not this bug has been assigned some to some other issues as a subtask or pre-req bug Something isn't working
Milestone

Comments

@henrikvilhelmberglund
Copy link

YAML metadata with string containing hyphen breaks building. For example I had a .md file generated from Obsidian with excalidraw-plugin in its own frontmatter, this caused mdsvex to try and parse it which caused an error because const { excalidraw-plugin } isn't valid JS.

I then tried to change the frontmatter string to something else with this

frontmatter: {
		marker: "+",
	},

but that also caused building to fail.

I'm guessing dashes could just be replaced with "" and things should work.
Code is somewhere here:
https://github.com/pngwn/MDsveX/blob/master/packages/mdsvex/src/transformers/index.ts#L335

@pngwn pngwn added this to the 1.0 milestone Feb 23, 2024
@pngwn pngwn added bug Something isn't working assigned Whether or not this bug has been assigned some to some other issues as a subtask or pre-req labels Feb 24, 2024
@pngwn pngwn mentioned this issue Feb 23, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned Whether or not this bug has been assigned some to some other issues as a subtask or pre-req bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants