------------
+-------------------------------------------------
+
+# Supported markdown formatting's
+
+Inline codes are surrounded with backticks.
+
+C program starts with \`main()\`.
+
+becomes
+
+C program starts with `main()`.
+
-------------------------------------------------
# Supported markdown formatting's
_https://github.com/visit1985/mdp_
+
void add_line(WINDOW *window, int y, int x, line_t *line, int max_cols, int colors) {
int i = 0; // increment
char *c; // char pointer for iteration
- char *special = "\\*_"; // list of interpreted chars
+ char *special = "\\*_`"; // list of interpreted chars
cstack_t *stack = cstack_init();
if(line->text->text) {
case '_':
wattroff(window, A_UNDERLINE);
break;
+ // disable inline code
+ case '`':
+ wattroff(window, A_REVERSE);
+ break;
}
// remove top special char from stack
case '_':
wattron(window, A_UNDERLINE);
break;
+ // enable inline code
+ case '`':
+ wattron(window, A_REVERSE);
+ break;
// do nothing for backslashes
}
case '_':
wattroff(window, A_UNDERLINE);
break;
+ // disable inline code
+ case '`':
+ wattroff(window, A_REVERSE);
+ break;
// do nothing for backslashes
}
}