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 1 commit into from Aug 22, 2017


Copy link

@ddfreyne ddfreyne commented Aug 22, 2017

Full identifiers (e.g. "/" — 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.

@ddfreyne ddfreyne force-pushed the refuse-full-identifier-ending-with-slash branch from fcdd7e9 to 57fcc9e Aug 22, 2017
@ddfreyne ddfreyne merged commit df07f35 into master Aug 22, 2017
3 checks passed
@ddfreyne ddfreyne deleted the refuse-full-identifier-ending-with-slash branch Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant