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

Disallow full identifiers from ending with a slash #1206

Merged
merged 1 commit into from Aug 22, 2017

Conversation

denisdefreyne
Copy link
Member

@denisdefreyne denisdefreyne commented Aug 22, 2017

Full identifiers (e.g. "/foo.md" — compare to legacy identifiers such as "/foo/") can never end with a slash. Nanoc does not currently enforce this, and silently allows a potentially buggy code.

This PR makes full identifiers that end with a slash explicitly invalid.

(It turns out that many of the tests cases were accidentally wrong. Yikes!)

This PR also makes Nanoc::Document#identifier= properly coerce the argument to an identifier, so that @item.identifier = 'hah' no longer turns the identifier from a Nanoc::Identifier into a String.

@denisdefreyne denisdefreyne force-pushed the refuse-full-identifier-ending-with-slash branch from fcdd7e9 to 57fcc9e Compare August 22, 2017 20:32
@denisdefreyne denisdefreyne merged commit df07f35 into master Aug 22, 2017
@denisdefreyne denisdefreyne deleted the refuse-full-identifier-ending-with-slash branch August 22, 2017 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant