diff options
| author | Grégoire Duchêne <gduchene@fastmail.net> | 2011-04-01 18:01:01 +0200 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@fastmail.net> | 2011-04-01 18:01:01 +0200 |
| commit | 1c5bf1893f960e73b389831af4a225c32ff1b132 (patch) | |
| tree | 7c4f1658840aae7222dba88bf946b89402312156 /src/main.cpp | |
| parent | ba76e1b03a1b691e0220ed31de1fdd1b6a0f924d (diff) | |
Line element added, plus a lot of good stuff.
This element is another milestone on the road to awesome new elements.
Besides, it was necessary to add this element if I wanted to implement
comment lines someday.
I also added some minor changes in the way mppdown handles newline
characters: they are now really expected, throwing an exception if
absent, and a newline character is now expected after every paragraph.
This newline character is then rendered back by the LaTeX generator,
hence following the proper LaTeX syntax regarding paragraphs.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 3c74993..92a0f04 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -76,7 +76,12 @@ int main(int argc, char** argv) { iiterator end = input.end(); document_t ast; - if (!qi::parse(begin, end, parser, ast) || begin != end) { + try { + if (!qi::parse(begin, end, parser, ast) || begin != end) { + cerr << "mppdown: error while parsing the file" << endl; + return 1; + } + } catch (...) { // VERY UGLY cerr << "mppdown: error while parsing the file" << endl; return 1; } |
