Fix function argument
Fixed multiple append() calls which passed the address of the character instead of its actual value.
This commit is contained in:
parent
fc48dfc0a5
commit
7dc67e3563
|
@ -158,7 +158,7 @@ std::string make_html(std::filesystem::path const &path) {
|
||||||
// Bold check
|
// Bold check
|
||||||
// Check whether this character has been escaped.
|
// Check whether this character has been escaped.
|
||||||
if (tag_comment || buf[x-1] == '\\') {
|
if (tag_comment || buf[x-1] == '\\') {
|
||||||
append(&c);
|
append(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ std::string make_html(std::filesystem::path const &path) {
|
||||||
// been escaped.
|
// been escaped.
|
||||||
|
|
||||||
if (tag_comment || buf[x-1] == '\\') {
|
if (tag_comment || buf[x-1] == '\\') {
|
||||||
append(&c);
|
append(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ std::string make_html(std::filesystem::path const &path) {
|
||||||
// beginning of a new line. Ignore it
|
// beginning of a new line. Ignore it
|
||||||
// if this is not a new line.
|
// if this is not a new line.
|
||||||
if (tag_comment || !newline) {
|
if (tag_comment || !newline) {
|
||||||
append(&c);
|
append(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ std::string make_html(std::filesystem::path const &path) {
|
||||||
// Check if this header was specified
|
// Check if this header was specified
|
||||||
// right at the beginning of the line.
|
// right at the beginning of the line.
|
||||||
(tag_h == 0 && x != 0)) {
|
(tag_h == 0 && x != 0)) {
|
||||||
append(&c);
|
append(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ std::string make_html(std::filesystem::path const &path) {
|
||||||
// Hyperlink text declaration has begun
|
// Hyperlink text declaration has begun
|
||||||
if (tag_comment || tag_a != NONE) {
|
if (tag_comment || tag_a != NONE) {
|
||||||
// Cannot add hyperlinks inside of hyperlinks;
|
// Cannot add hyperlinks inside of hyperlinks;
|
||||||
append(&c);
|
append(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tag_a_buf = "";
|
tag_a_buf = "";
|
||||||
|
@ -280,7 +280,7 @@ std::string make_html(std::filesystem::path const &path) {
|
||||||
// Hyperlink text declaration ended
|
// Hyperlink text declaration ended
|
||||||
if (tag_comment || tag_a != READING_CONTENTS) {
|
if (tag_comment || tag_a != READING_CONTENTS) {
|
||||||
// Ignore if not reading hyperlink.
|
// Ignore if not reading hyperlink.
|
||||||
append(&c);
|
append(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tag_a = EXPECTING_URL;
|
tag_a = EXPECTING_URL;
|
||||||
|
@ -288,7 +288,7 @@ std::string make_html(std::filesystem::path const &path) {
|
||||||
case '(':
|
case '(':
|
||||||
// Hyperlink address declaration has begun
|
// Hyperlink address declaration has begun
|
||||||
if (tag_comment || tag_a != EXPECTING_URL) {
|
if (tag_comment || tag_a != EXPECTING_URL) {
|
||||||
append(&c);
|
append(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tag_a = READING_URL;
|
tag_a = READING_URL;
|
||||||
|
@ -296,7 +296,7 @@ std::string make_html(std::filesystem::path const &path) {
|
||||||
case ')':
|
case ')':
|
||||||
// Hyperlink address declaration ended
|
// Hyperlink address declaration ended
|
||||||
if (tag_comment || tag_a != READING_URL) {
|
if (tag_comment || tag_a != READING_URL) {
|
||||||
append(&c);
|
append(c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tag_a = NONE;
|
tag_a = NONE;
|
||||||
|
|
Loading…
Reference in New Issue