X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=include%2Fparser.h;h=99f68ff7cef1783a10284bcd1f00af6bcb5c44f7;hb=bdd26d4dde3b3d3180619cc81622081025ca6cb5;hp=185fa8d7ff70778c6785ec5799c9129193477b15;hpb=b416f18295f7edcb5474396a6b26a59fd5ddb1f5;p=smdp.git diff --git a/include/parser.h b/include/parser.h index 185fa8d..99f68ff 100644 --- a/include/parser.h +++ b/include/parser.h @@ -5,6 +5,23 @@ * Functions necessary to parse a file and transform its content into * a deck of slides containing lines. All based on markdown formating * rules. + * Copyright (C) 2014 Michael Goehler + * + * This file is part of mdp. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * * * function: markdown_load is the main function which reads a file handle, * and initializes deck, slides and lines @@ -18,17 +35,20 @@ * */ +#include "common.h" #include "markdown.h" #define EXPAND_TABS 4 #define CODE_INDENT 4 +#define UNORDERED_LIST_MAX_LEVEL 3 deck_t *markdown_load(FILE *input); int markdown_analyse(cstring_t *text); void markdown_debug(deck_t *deck, int debug); -int is_utf8(char ch); +bool is_utf8(char ch); int length_utf8(char ch); int next_nonblank(cstring_t *text, int i); +int prev_blank(cstring_t *text, int i); int next_blank(cstring_t *text, int i); int next_word(cstring_t *text, int i);