progsource / maddy

C++ Markdown to HTML header-only parser library
MIT License
203 stars 40 forks source link

Issue with parsing #26

Closed sharadcodes closed 4 years ago

sharadcodes commented 4 years ago

Minimal Code Example

# Heading

<a href="abc.html">Link</a>
<a href="abc.html">Link</a>
<a href="abc.html">Link</a>
<a href="abc.html">Link</a>

I want to prevent those anchor tags from being surrounded with p tags

Conditions

. .
Operating System: Ubuntu 18.04
Compiler: g++
Compiler flags: none
maddy version: 1.1.0

Description

How to prevent a specific portion of code from being rendered ?

progsource commented 4 years ago

With https://github.com/progsource/maddy/pull/27 this should be fixed.

progsource commented 4 years ago

Please try out version 1.1.1 with config like:

auto config = std::make_shared<maddy::ParserConfig>();
config->isHTMLWrappedInParagraph = false;

auto parser = std::make_shared<maddy::Parser>(config);
const auto htmlOutput = parser->Parse(markdown);

and check if this solves your problem.

sharadcodes commented 4 years ago

@progsource Thanks for the update will use it and see if it works.

sharadcodes commented 4 years ago

It worked perfectly.