8000 unordered/ordered list are not working correctly in some conditions · Issue #59 · progsource/maddy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

unordered/ordered list are not working correctly in some conditions #59

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

Open
asnagni opened this issue Jul 10, 2024 · 0 comments
Open

Comments

@asnagni
Copy link
asnagni commented Jul 10, 2024

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"(

Prioritization of Actions

The feedback data was collected on a numerical scale from 1 to 5, where higher scores indicate higher satisfaction. Here is a summary of the satisfaction levels:

  • Average Score: 3.5
  • Score Distribution:
    • Score 5: 34%
    • Score 4: 14%
    • Score 3: 20%
    • Score 2: 18%
    • Score 1: 14%

)";

        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?

I noticed that the unordered list parser define in “unorderedlistparser.h” as an issue:

  1. case 1: If you don’t have a space between the unordered list and the previous text, the parser will fail to process properly the unordered list.

  2. case 2: if you do have a space between the previous text the unordered list, the parser will parse properly (100% correct).

These are examples to illustrate what I got:

case 1: No space between the unordered list and the previous text.

The markdown input:
The feedback data was collected on a numerical scale from 1 to 5, where higher scores indicate higher satisfaction. Here is a summary of the satisfaction levels:

  • Average Score: 3.5
  • Score Distribution:
    • Score 5: 34%
    • Score 4: 14%
    • Score 3: 20%
    • Score 2: 18%
    • Score 1: 14%

The Html output:
The feedback data was collected on a numerical scale from 1 to 5, where higher scores indicate higher satisfaction. Here is a summary of the satisfaction levels: - Average Score: 3.5 - Score Distribution: - Score 5: 34% - Score 4: 14% - Score 3: 20% - Score 2: 18% - Score 1: 14%

case 2: We do a space have between the unordered list and the previous text.

The markdown input:
The feedback data was collected on a numerical scale from 1 to 5, where higher scores indicate higher satisfaction. Here is a summary of the satisfaction levels:

  • Average Score: 3.5
  • Score Distribution:
    • Score 5: 34%
    • Score 4: 14%
    • Score 3: 20%
    • Score 2: 18%
    • Score 1: 14%

The Html output:

The feedback data was collected on a numerical scale from 1 to 5, where higher scores indicate higher satisfaction. Here is a summary of the satisfaction levels:
	•	Average Score: 3.5
	•	Score Distribution:
	    ◦	Score 5: 34%
	    ◦	Score 4: 14%
	    ◦	Score 3: 20%
	    ◦	Score 2: 18%
	    ◦	Score 1: 14%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0