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

Add shortcode 'invocation' variable to allow a shortcode to track how… #1236

Merged
merged 8 commits into from
Dec 14, 2020

Conversation

NathanaelLane
Copy link
Contributor

@NathanaelLane NathanaelLane commented Nov 11, 2020

… many times it has been invoked in a given Markdown file., as per this Discourse topic.

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

… many times it has been invoked in a given Markdown file
components/rendering/src/shortcode.rs Outdated Show resolved Hide resolved
@NathanaelLane
Copy link
Contributor Author

Apologies for all the commit noise; not sure what happened with the merge

@Keats Keats merged commit ff1ee3d into getzola:next Dec 14, 2020
@Keats
Copy link
Collaborator

Keats commented Dec 14, 2020

Thanks!

Keats pushed a commit that referenced this pull request Dec 14, 2020
#1236)

* add shortcode 'invocation' variable to allow a shortcode to track how many times it has been invoked in a given Markdown file

* use closure (implicit struct) instead of explicit struct for invocation tracking

* update variable name to "nth"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants