Update markdown.
This commit is contained in:
parent
cc1c6570e3
commit
80d72823f7
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,3 +10,4 @@ rf
|
|||||||
auth.h
|
auth.h
|
||||||
.rcontext*
|
.rcontext*
|
||||||
tests
|
tests
|
||||||
|
rpylib.so
|
||||||
|
@ -81,7 +81,7 @@ void parse_markdown_to_ansi(const char *markdown) {
|
|||||||
bool inside_code = false;
|
bool inside_code = false;
|
||||||
|
|
||||||
while (*ptr) {
|
while (*ptr) {
|
||||||
if (*ptr == '`') {
|
if (*ptr == '`' && *(ptr + 1) != '`') {
|
||||||
inside_code = !inside_code;
|
inside_code = !inside_code;
|
||||||
if (inside_code) {
|
if (inside_code) {
|
||||||
printf(FG_YELLOW);
|
printf(FG_YELLOW);
|
||||||
@ -90,6 +90,9 @@ void parse_markdown_to_ansi(const char *markdown) {
|
|||||||
}
|
}
|
||||||
ptr++;
|
ptr++;
|
||||||
continue;
|
continue;
|
||||||
|
}else if(!strncmp(ptr, "```", 3)) {
|
||||||
|
inside_code = !inside_code;
|
||||||
|
ptr = strstr(ptr, "\n") + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inside_code) {
|
if (inside_code) {
|
||||||
@ -152,4 +155,4 @@ void parse_markdown_to_ansi(const char *markdown) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user