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

fix(template): expandable variables in lua expr #841

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

moreka
Copy link
Contributor

@moreka moreka commented Dec 18, 2024

This fixes the order which the template is compiled. Previously, the expressions %() were compiled before expandable variables (such as %x). This made the example template in [1] to produce:

* [[url][x]]

instead of

* [[url][end part of the url]]

By doing the expression compilation after expandable ones, this issue is resolved.

[1] https://github.com/nvim-orgmode/orgmode/wiki/Getting-Started#captures

This fixes the order which the template is compiled. Previously, the
expressions %() were compiled before expandable variables (such as %x).
This made the example template in [1] to produce:
* [[url][x]]
instead of
* [[url][end part of the url]]
By doing the expression compilation after expandable ones, this issue is
resolved.

[1] https://github.com/nvim-orgmode/orgmode/wiki/Getting-Started#captures
Copy link
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kristijanhusak kristijanhusak merged commit db7f044 into nvim-orgmode:master Dec 20, 2024
6 checks passed
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.

2 participants