123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /*
- * This file is the main code of Texdi
- * Copyright (C) <2021> <alkeon> [alkeon@autistici.org]
-
- * Texdi 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.
- *
- * Texdi 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 Texdi. If not, see <http://www.gnu.org/licenses/>.
- */
- #ifndef __TEDI2TEX__
- #define __TEDI2TEX__
- #include <iostream>
- #include <string>
- #include "../tedi2lang/tedi2lang.h"
- using namespace std;
- class tedi2tex: public tedi2lang{
- public:
- tedi2tex(tags_definition td);
- tedi2tex();
- tags_definition default_tags_value();
-
- string convert_line(string& line);
- void convert_line_image(string& line);
- void convert_line_block(string& line);
- string convert_line_table_row(string& line);
- string convert_line_table(string& line, size_t first_pipe);
- string convert_line_control_tags(string& line);
- int get_table_columns(string line);
- string get_table_start_tag(string& line);
- void escape_underscores(string& line);
- bool found(size_t position){ return (position != string::npos); }
- private:
- const string _start_paragraph_tag;
- bool _is_paragraph;
- };
- #endif
|