Update markdown.

This commit is contained in:
2025-03-28 03:02:24 +01:00
parent cc1c6570e3
commit 80d72823f7
3 changed files with 6 additions and 2 deletions
+1
View File
@@ -10,3 +10,4 @@ rf
auth.h auth.h
.rcontext* .rcontext*
tests tests
rpylib.so
+5 -2
View File
@@ -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) {
} }
} }
} }
} }
BIN
View File
Binary file not shown.