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; break;
case '[': case '[':
// Hyperlink text declaration has begun // 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; // Cannot add hyperlinks inside of hyperlinks;
append(c); append(c);
break; break;
@ -278,7 +278,7 @@ std::string make_html(std::filesystem::path const &path) {
break; break;
case ']': case ']':
// Hyperlink text declaration ended // 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. // Ignore if not reading hyperlink.
append(c); append(c);
break; break;