diff --git a/src/gemparse.c b/src/gemparse.c index 768f29a..3b9a23f 100644 --- a/src/gemparse.c +++ b/src/gemparse.c @@ -10,6 +10,7 @@ void addH2 (const char *line); void addH3 (const char *line); void addLink (const char *url, const char *text); void addCode (const char *meta, const char *code); +void addQuote (const char *line); // general functions @@ -129,6 +130,19 @@ parseFile (char *path) addCode (line + 3, code); } + else if (size > 1 && line[0] == '>') + { + int i = 1; + + //Remove whitespace before the text + while (i < size && line[i] == ' ') + i++; + + //Remove tailing '\n' + line[size - 1] = '\0'; + + addQuote (line + i); + } else printf ("%s", line); } @@ -187,4 +201,10 @@ addCode (const char *meta, printf ("code {\n%s\n%s\n}\n", meta, code); } +void +addQuote (const char *text) +{ + printf ("quote {\n%s\n}\n", text); +} + #endif