Fix URL escape bug

Fixed a bug which caused the Markdown interpreter to ignore escaped '-' characters.
This commit is contained in:
luca0N! 2022-09-12 07:28:42 -03:00
parent eb04e715d5
commit 340046a264
Signed by: luca0N
GPG Key ID: 2E7B4655CF16D7D6
1 changed files with 2 additions and 2 deletions

View File

@ -267,7 +267,7 @@ std::string make_html(std::filesystem::path const &path) {
break;
case '[':
// Hyperlink text declaration has begun
if (tag_comment || tag_a != NONE) {
if (tag_comment || tag_a != NONE || buf[x-1] == '\\') {
// Cannot add hyperlinks inside of hyperlinks;
append(c);
break;
@ -278,7 +278,7 @@ std::string make_html(std::filesystem::path const &path) {
break;
case ']':
// Hyperlink text declaration ended
if (tag_comment || tag_a != READING_CONTENTS) {
if (tag_comment || tag_a != READING_CONTENTS || buf[x-1] == '\\') {
// Ignore if not reading hyperlink.
append(c);
break;