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

[BUG] - List formatting in notes missing spacing #2854

Open
6 tasks done
andrewvaughan opened this issue Dec 16, 2023 · 4 comments · May be fixed by #4687
Open
6 tasks done

[BUG] - List formatting in notes missing spacing #2854

andrewvaughan opened this issue Dec 16, 2023 · 4 comments · May be fixed by #4687
Labels
bug: confirmed bug Something isn't working

Comments

@andrewvaughan
Copy link

andrewvaughan commented Dec 16, 2023

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

When entering a note (and, I presume, with any Markdown), spacing is missing from any ordered (and I presume unordered) list.

Screenshot 2023-12-16 at 3 40 40 PM

Steps to Reproduce

Create a list in a note with Markdown, then add a paragraph after.

Please provide relevant logs

N/A

Mealie Version

1.0.0-RC2

Deployment

Docker (Linux)

Additional Deployment Details

No response

@andrewvaughan andrewvaughan added bug Something isn't working triage labels Dec 16, 2023
@boc-the-git
Copy link
Collaborator

Can you please include the actual text you're entering, what you expect it to have looked like, and what it actually does look like.

@andrewvaughan
Copy link
Author

andrewvaughan commented Dec 18, 2023

Another example on top of the one in the OP:

To customize this recipe to your specific container, do the following:

1. Weigh your container, empty, and write down the number, in grams
2. Fill your container with water to the height of the candle, and weigh again, in grams; write this down
3. Subtract #1 from #2 above to get your `Water Weight`
4. Multiply the `Water Weight` by `0.88` to get your `Total Weight`
5. To get your `Wax Weight`, divide `Total Weight` by `1.08`
6. To get your `Fragrance Oil Weight`, multiply `(Water Weight * 0.88) - Wax Weight`

For this recipe, we measured 223g of water per-container. Our calculations were thus, as an example:

Result:
Screenshot 2023-12-18 at 6 18 46 PM

There should be a vertical space between the last list item and the next paragraph.

@Arshad561
Copy link
Contributor

It appears that the issue lies with the VueMarkdown component from @adapttive/vue-markdown. The breaks prop, which should convert \n into <br> tags for new lines, is not functioning as expected. You can see this behavior in the live demo here: https://adapttive.github.io/vue-markdown/

@cnorteye
Copy link

On my local server, I can trying to add test the code solution below in the RecepieNotes.vue but the changes are not rending.
// Define preprocessMarkdown function
function preprocessMarkdown(rawMarkdown: string | null | undefined): string {
if (!rawMarkdown) {
return "";
}
// Replace single newlines with double newlines for Markdown rendering
return rawMarkdown.replace(/\n/g, " \n");
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
4 participants