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(summary): ordering and indentation of nested entries #1486

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

nuhakala
Copy link
Contributor

Current state sometimes mixes entries with nested categories. For example, if there is three items:

  • C with category cat
  • A with category cat.sub
  • B with category cat.sub

The produced summary looks like this:

* Index
** Cat
*** Sub
   - A
   - B
   - C

even though I want C to be directly under Cat. With multiple notes this causes nested categories to be rather messy sometimes.

I fixed this by simply introducing few temporary variables and adding nested categories to the summary at the end.

@vhyrro
Copy link
Member

vhyrro commented Jun 27, 2024

Code looks good! I'll also play around with the implementation later today to make sure it all works :)

@vhyrro
Copy link
Member

vhyrro commented Jun 28, 2024

Seems to work well for me, thanks for the PR!

@vhyrro vhyrro merged commit 9279672 into nvim-neorg:main Jun 28, 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.

None yet

2 participants