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

null string in tags #221

Closed
takaxp opened this issue Oct 8, 2018 · 10 comments
Closed

null string in tags #221

takaxp opened this issue Oct 8, 2018 · 10 comments
Labels

Comments

@takaxp
Copy link
Contributor

takaxp commented Oct 8, 2018

Hi.

I just find that null string tags are exported to markdowns. Is this intended?

screen shot 2018-10-08 at 16 13 20

@kaushalmodi kaushalmodi added the bug label Oct 8, 2018
@kaushalmodi
Copy link
Owner

Yes, this is a bug. Though, I am curious, how did you end up with this bug? Why set empty strings for tags? :)

@takaxp
Copy link
Contributor Author

takaxp commented Oct 8, 2018

I just put "" into EXPORT_HUGO_TAGS :)

:EXPORT_HUGO_TAGS: "" "hoge"

It was happened accidentally while refactoring my tags, but the post was also exported by the auto-exporter. After publishing my new posts including the post with null tag, then I realized it an empty tag was appeared in the tag could in my Hugo blog.

@kaushalmodi
Copy link
Owner

@takaxp The fix was easy. I think most of your bug reports got resolved by using just org-string-nw-p :P You are really good at finding those corner cases! 👍

@takaxp
Copy link
Contributor Author

takaxp commented Oct 8, 2018

Interesting, and thanks! 👍

@kaushalmodi kaushalmodi reopened this Oct 8, 2018
@kaushalmodi
Copy link
Owner

@takaxp Actually I am thinking of reverting that commit and instead throw a user-error if "" tag is found.

I don't see a reason to commit "" to the source Org files permanently. As you said, they happened by mistake, and should be fixed.

That commit just masked the user mistake. But by making this an error, that can be fixed.

@takaxp
Copy link
Contributor Author

takaxp commented Oct 8, 2018

That's good idea. For me, user-error will be able to provide kind suggestion.

@kaushalmodi
Copy link
Owner

Thanks for the quick response, I'll make the user-error display the name of the front-matter having empty string element.

@takaxp
Copy link
Contributor Author

takaxp commented Oct 8, 2018

That's very useful because actually it took some time to find the entry with null field. So if the user-error provides information about the mistakes, that's really useful.

@kaushalmodi
Copy link
Owner

@takaxp OK, let me know how it goes after updating to the latest master.

@takaxp
Copy link
Contributor Author

takaxp commented Oct 9, 2018

Verified. Works well. Thank you so much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants