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
Allow acessing :pre snapshot in item itself #538
Conversation
Can I get a code review? |
👍 looks reasonable - although I do not have full understanding of it so I might be missing something |
Is the |
Yeah, Edit: |
Then maybe I missed something? I thought this was setting it up to allow accessing |
@bobthecow This allows accessing |
Right. So I was asking if you should be able to access |
@bobthecow Hm, re-reading the original question, I think my answer is misleading. From within the item itself, using When accessing the compiled content from another item, accessing These moving pre-snapshots and post-snapshots are difficult to reason about and one of the reasons why they’ll be gone in nanoc 4! |
Does it make %main#content.container
- toc = extract_toc(yield, :depth => @item[:toc_depth]) |
@gpakosz That’s still not possible, but |
Allow acessing :pre snapshot in item itself
Fix for #537.
The
:pre
snapshot can now be accessed within the item itself, provided that the:post
snapshot is present (because at that point, the:pre
snapshot stops moving).The implementation of the fix in this PR is conceptually the same as in the aforementioned bug, but refactored.
CC @nanoc/contributors @jethrogb