progsource / maddy

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

[DO NOT MERGE] Not fixed completely #22

Open cha-ku opened 4 years ago

cha-ku commented 4 years ago

Hey @progsource, I tried to fix this, and this is working as seen in https://regex101.com/r/a40XyN/1, but in the code it compiles but gives me std::regex_error at runtime. I am unable to figure out what could be causing this. I am a complete beginner in C++ so it's possible I am missing something.

progsource commented 4 years ago

The regex tool says:

A quantifier following a lookaround serves no purpose, and can safely be removed from the regular expression

If I remove the + for both the places, where the tool says that, it runs again, but sadly not yet with the desired result.

I'll check on that more today.

progsource commented 4 years ago

One of the problems, that I see here, is that the following

some (_text_) some more text

should actually result in

some (<em>text</em>) some more text

and

[some _text_ here](https://github.com/some_other_person)

should result in

[some <em>text</em> here](https://github.com/some_other_person)
cha-ku commented 4 years ago

Ok I will take a look at this