Hello,
We have encountered an issue with the Markdown component used in our project.
Whenever an empty line is present in the Markdown content, saving and reloading the document introduces an extra space in the empty line.
This behavior becomes problematic when editing a document multiple times, as it requires manually removing the unwanted spaces to maintain proper alignment between lines. If unnoticed, these additional spaces can lead to inconsistencies in the document layout and formatting.
Best regards
Alessandro Mancini
Extra Space Added in Empty Lines in Markdown Component
-
- Site Admin
- Posts: 17679
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Extra Space Added in Empty Lines in Markdown Component
Unfortunately, Markdown does not allow empty paragraphs. So TRichView adds a non-breaking space ( ) to them when saving.
It would be possible to save <br> instead. <br> is one of few HTML tags that TRichView parses inside Markdown. However, this is not a paragraph break but a line break inside a paragraph.
I can add an option in loading to remove NBSP in paragraphs loaded from Markdown, if this is the only character in the paragraph.
It would be possible to save <br> instead. <br> is one of few HTML tags that TRichView parses inside Markdown. However, this is not a paragraph break but a line break inside a paragraph.
I can add an option in loading to remove NBSP in paragraphs loaded from Markdown, if this is the only character in the paragraph.
Re: Extra Space Added in Empty Lines in Markdown Component
Thank you for your explanation regarding the handling of empty paragraphs in Markdown. I understand the current behavior and appreciate the clarification.
I believe the proposed option to remove non-breaking spaces (NBSP) in paragraphs loaded from Markdown, if they are the only character in the paragraph, would be a great solution. I kindly ask you to implement this feature, as it would significantly improve the usability of the component in our use case.
I look forward to the next version including this option and want to thank you for considering this enhancement.
I believe the proposed option to remove non-breaking spaces (NBSP) in paragraphs loaded from Markdown, if they are the only character in the paragraph, would be a great solution. I kindly ask you to implement this feature, as it would significantly improve the usability of the component in our use case.
I look forward to the next version including this option and want to thank you for considering this enhancement.