Skip to content

Duplicate headings fix #25

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

Merged
merged 9 commits into from
Jun 17, 2025
Merged

Duplicate headings fix #25

merged 9 commits into from
Jun 17, 2025

Conversation

evanamiesgalonski
Copy link
Member

  • improve handling of duplicate headers across and within sections
  • add unit tests

@evanamiesgalonski
Copy link
Member Author

evanamiesgalonski commented Jun 11, 2025

ok I think I’ve sorted this out
There may still be some edge cases that aren’t covered but i believe we should be ok as not all circumstances that can come up actually happen.

for example (with each row representing a section in a report):



sub1 sub2 sub3
1 H Sh Ssh
2 H Sh Ssh
3 H Sh1 Ssh
4 H1 Sh Ssh
5 H Sh Ssh

we get:

sub1 sub2 sub3 heading
1 H Sh Ssh \n#### H\n\n##### Sh\n\n###### Ssh\n
2 H Sh Ssh
3 H Sh1 Ssh \n##### Sh1\n\n###### Ssh\n
4 H1 Sh Ssh \n#### H1\n\n##### Sh\n\n###### Ssh\n
5 H Sh Ssh

there would be no headers for section 5, as they’ve been repeated previously. But this shouldn’t matter given objects get pulled one time per subfolder.

This would be the result before I made these changes:

sub1 sub2 sub3 heading
1 H Sh Ssh \n#### H\n\n##### Sh\n\n###### Ssh\n
2 H Sh Ssh
3 H Sh1 Ssh \n##### Sh1\n
4 H1 Sh Ssh \n#### H1\n\n##### Sh\n
5 H Sh Ssh \n#### H\n

any thoughts on other potential issues / things we should test before merging?

@evanamiesgalonski
Copy link
Member Author

not quite right, pushed additional changes

@nehill197
Copy link
Member

This worked on my example (Line Creek report).

@evanamiesgalonski evanamiesgalonski merged commit f3333da into main Jun 17, 2025
7 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.

3 participants