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

Ignore empty metadata. #1485

Closed
wants to merge 1 commit into from
Closed

Ignore empty metadata. #1485

wants to merge 1 commit into from

Conversation

foresto
Copy link
Contributor

@foresto foresto commented Sep 30, 2014

I originally set out to stop pelican from creating files named .html when an empty Slug: definition appeared in a Markdown file, but after browsing the reader code, I saw there were more opportunities for empty values to slip in. Since I don't know of any metadata that would make sense with empty values, I made read_file() filter out any such items after it gathers the metadata.

The code filters out most non-true values, including empty strings and None, but it preserves numeric zero values. It runs after the cache phase, so as not to affect caching behavior when whitespace changes are made to a file.

Fixes #1469.
Might also fix #1398?

@foresto foresto closed this Sep 30, 2014
@foresto foresto deleted the ignore-empty-metadata branch September 30, 2014 17:23
@foresto
Copy link
Contributor Author

foresto commented Sep 30, 2014

I noticed a problem in my patch. I'll fix it and re-submit.

@justinmayer
Copy link
Member

Is there some reason you closed your pull request instead of rebasing? From project maintainers' perspective, making your follow-on changes and then rebasing+squashing your commits would be preferable.

@foresto
Copy link
Contributor Author

foresto commented Sep 30, 2014

Only because I just started using git, hadn't yet learned squashing, and didn't want anyone wasting their time reviewing my faulty patch before my revision is ready. I'll squash next time.

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.

Empty slug causes generation of hidden file Tag with empty name created for line tags:
2 participants