8000 [Bug][Markdown]: Does not detect the two Spaces at the End of the line · Issue #73 · progsource/maddy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Bug][Markdown]: Does not detect the two Spaces at the End of the line #73
Open
@Voronwe-the-guide

Description

@Voronwe-the-guide

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0