Fix URL escape bug
Fixed a bug which caused the Markdown interpreter to ignore escaped '-' characters.
This commit is contained in:
parent
eb04e715d5
commit
340046a264
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue