maddy icon indicating copy to clipboard operation
maddy copied to clipboard

[Bug][Markdown]: Does not detect the two Spaces at the End of the line

Open Voronwe-the-guide opened this issue 8 months ago • 1 comments

Operating System

OSX

Compiler

clang

Compiler flags

-std=gnu++20

maddy version

1.4.0 (latest)

Minimal Mardown example

MarkdownTest.md

What is not working? What did you try?

According to the Markdown Spec, a line should end with two Spaces to make a break (https://www.markdownguide.org/basic-syntax/#line-breaks) However, it seems to ignore the two spaces. I added some quick fix into breaklineparser.h:

line = std::regex_replace(line, re, replacement);
if (line.ends_with(" ")) { line.append(replacement);

This works unfortunately only with C++ 20 Reason for writing it this way is to avoid to replaces 2 Space in the middle of a line by

Voronwe-the-guide avatar Apr 16 '25 09:04 Voronwe-the-guide