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

Fixed index out of range error in fancy exporter #1522

Merged
merged 1 commit into from Jul 30, 2022

Conversation

apainintheneck
Copy link
Contributor

@apainintheneck apainintheneck commented Jun 28, 2022

Checklist

  • I have read the contributing doc.
  • I have included a link to the relevant issue number.
  • I have checked to ensure there aren't other open pull requests
    for the same issue.
  • I have written new tests for these changes, as needed.

This is just a small bug that shows up when trying to print entries using the fancy exporter that lack titles. This error doesn't show up with any of the other --format methods as far as I can tell.

Steps to reproduce

  1. Use jrnl edit to add a post without a title.
  2. Enter jrnl -1.

This change just makes sure that the title_lines list always includes at least one empty string.

@micahellison
Copy link
Member

micahellison commented Jul 16, 2022

Hi @apainintheneck, I'm having a time running the steps to reproduce. Every time I edit my journal, it keeps a title of some sort, or folds the entry into the previous entry. Could you let me know what specific text you're entering into your editor to get this to work? Thanks.
Never mind! Just figured out - the entry needs to be completely blank except for a space after the timestamp.

Could you add a test for this PR in format.feature?

@apainintheneck
Copy link
Contributor Author

I was unable to find a way to reproduce this bug with a BDD test. Not sure if it's really necessary either since it's such a small thing.

Copy link
Member

@wren wren left a comment

Choose a reason for hiding this comment

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

Ok, that makes sense. Thanks!

@wren wren added the bug Something isn't working label Jul 30, 2022
@wren wren merged commit 08c366d into jrnl-org:develop Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants