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: Markdown paragraph spacing issue in recipe notes #4664

Closed
wants to merge 0 commits into from

Conversation

cnorteye
Copy link

@cnorteye cnorteye commented Dec 3, 2024

What type of PR is this?

  • bug

What this PR does / why we need it:

This PR addresses an issue where single-line breaks in recipe notes caused incorrect paragraph spacing. The following changes were made:

  • Added a preprocessMarkdown function to RecipeNotes.vue to convert single line breaks into double line breaks for proper Markdown rendering.
  • Updated SafeMarkdown usage in RecipeNotes.vue to preprocess text before rendering.
    These changes ensure that paragraphs are spaced correctly when rendering recipe notes.

Before:
Screenshot 2024-12-02 at 10 58 14 PM
Screenshot 2024-12-02 at 10 58 28 PM

After:
Screenshot 2024-12-02 at 10 51 27 PM
Screenshot 2024-12-02 at 10 51 41 PM

Which issue(s) this PR fixes:

Fixes #2854
Fixes #2846

Testing

Since this was a UI improvement, I just observed the changes

@github-actions github-actions bot added the bugfix label Dec 3, 2024
@cnorteye cnorteye marked this pull request as ready for review December 3, 2024 06:02
@michael-genson
Copy link
Collaborator

Hey there! Changes look good in the screenshots, but I think something's wrong with the branch/PR. I'm only seeing changes to the poetry lock file, rather than the frontend changes. Can you double check the branch?

@cnorteye
Copy link
Author

cnorteye commented Dec 3, 2024

Hey there! Changes look good in the screenshots, but I think something's wrong with the branch/PR. I'm only seeing changes to the poetry lock file, rather than the frontend changes. Can you double check the branch?

Yes, I look into that. Thank you

@cnorteye cnorteye changed the title Fix: Markdown paragraph spacing issue in recipe notes fix: Markdown paragraph spacing issue in recipe notes Dec 3, 2024
@michael-genson
Copy link
Collaborator

It looks like you changed a bunch of the dev container config and added NPM. It doesn't look like this PR needs any dependency changes, so please remove changes to those files from this PR. If I'm reading this correctly, the only changes should be those made in frontend/components/global/SafeMarkdown.vue.

It may be easier to start fresh with a new branch off of mealie-next, rather than removing changes from each file

@cnorteye
Copy link
Author

cnorteye commented Dec 5, 2024

It looks like you changed a bunch of the dev container config and added NPM. It doesn't look like this PR needs any dependency changes, so please remove changes to those files from this PR. If I'm reading this correctly, the only changes should be those made in frontend/components/global/SafeMarkdown.vue.

It may be easier to start fresh with a new branch off of mealie-next, rather than removing changes from each file

Let me know if I did it correctly. I moved all the changes I made and only updated the frontend/components/global/SafeMarkdown.vue. When trying to commit, my changes kept failing the fix end of file pre-commit hooks so I had to make some minor changes to the formatting within the SafeMarkdown.vue file.

@michael-genson
Copy link
Collaborator

I'm still seeing changes to 11 files: https://github.com/mealie-recipes/mealie/pull/4664/files

@cnorteye
Copy link
Author

cnorteye commented Dec 6, 2024

Yes, I am not sure how to remove those files. I tried your recommendation of working off another branch, but when I committed my changes it still shows the 10 files from the prior commit. I searched to see if there was a way to undo a commit and none of the answers were helpful. It seems like maybe closing this PR and reopening another might be better? Please let me know.

@cnorteye
Copy link
Author

cnorteye commented Dec 6, 2024

@michael-genson I opened a draft pull request #4687. I had accidentally closed this PR attempting to update the files. Let me know upon your review if the other PR is good. Thanks for your patience while I tried to figure this out :)

@michael-genson
Copy link
Collaborator

No worries! That one looks much better :) I should have time to review early next week (out of town this weekend). Feel free to take it out of draft when it's ready!

@cnorteye
Copy link
Author

cnorteye commented Dec 8, 2024

Sounds good! I have marked it for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants