docs: fix block end delimiter, slugify signature, and stale repo refs - #189
Merged
Conversation
Three documented behaviours did not match the implementation.
1. Block end delimiter was written as `%@}` in two places.
template_renderer.py sets block_end_string='@%}'. Using `%@}` raises
TemplateSyntaxError. template-variables.md contradicted itself: correct
in the "Custom Delimiters" summary, wrong in "Block Syntax" below it.
2. `slugify` was documented as taking an optional separator argument.
filters.py defines slugify(value) with no second parameter, so
slugify(separator="_") raises TypeError. Replaced with the actual
behaviour and the `| slugify | replace("-", "_")` idiom. Also noted that
underscores are stripped rather than converted (My_Project -> myproject).
3. Two `default_branch` examples referenced `httpdss/struct`, the old
repository name.
Also adds the one global missing from the reference (`current_repo()`),
documents `to_json`'s `indent` argument, and warns that `uuid()` and `now()`
are non-deterministic — a file using either always appears in
`generate --dry-run --diff`, which silently ruins that diff as a drift check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three documented behaviours did not match the implementation.
Block end delimiter was written as
%@}in two places.template_renderer.py sets block_end_string='@%}'. Using
%@}raisesTemplateSyntaxError. template-variables.md contradicted itself: correct
in the "Custom Delimiters" summary, wrong in "Block Syntax" below it.
slugifywas documented as taking an optional separator argument.filters.py defines slugify(value) with no second parameter, so
slugify(separator="_") raises TypeError. Replaced with the actual
behaviour and the
| slugify | replace("-", "_")idiom. Also noted thatunderscores are stripped rather than converted (My_Project -> myproject).
Two
default_branchexamples referencedhttpdss/struct, the oldrepository name.
Also adds the one global missing from the reference (
current_repo()),documents
to_json'sindentargument, and warns thatuuid()andnow()are non-deterministic — a file using either always appears in
generate --dry-run --diff, which silently ruins that diff as a drift check.How this was verified
Output: