maddy icon indicating copy to clipboard operation
maddy copied to clipboard

Maddy doesn't process properly a list in certain conditions

Open asnagni opened this issue 1 year ago • 2 comments

Operating System

iOS (C++)

Compiler

clang

Compiler flags

-fno-char8_t , -fmodules, -fcxx-modules, '-std=c++20'

maddy version

1.3.0 (latest)

Minimal C++ example

std::string feedbackReport = R"(##

### Average Score
The average score is also calculated to understand the general sentiment of the users.

**Average Score:** 5.01

### Distribution of Scores
The distribution of CES scores is as follows:
- Score 1: 12
- Score 2: 8
- Score 3: 10
- Score 4: 13
- Score 5: 14
- Score 6: 20
- Score 7: 26


)";
            
            std::shared_ptr<maddy::ParserConfig> config = std::make_shared<maddy::ParserConfig>();
            config->enabledParsers |= maddy::types::LATEX_BLOCK_PARSER;

            std::shared_ptr<maddy::Parser> parser = std::make_shared<maddy::Parser>(config);
            std::stringstream markdownInput(feedbackReport);
            std::string htmlOutput = parser->Parse(markdownInput);

What is not working? What did you try?

The list is not properly translated in Html if you don't have an empty line between a paragraph/text and the first element of the list. If I don't have "The distribution of CES scores is as follows:" and "- Score 1: 12"

This is the result that I have (it should be a list): IMG_CE909125047F-1

asnagni avatar Jul 09 '24 02:07 asnagni

I will add it to the tests for the next version to make this work.

progsource avatar Jul 10 '24 02:07 progsource

Thank you 👍

asnagni avatar Jul 10 '24 15:07 asnagni