From 1c5bf1893f960e73b389831af4a225c32ff1b132 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Fri, 1 Apr 2011 18:01:01 +0200 Subject: 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. --- src/parser/text_p.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/parser/text_p.cpp') diff --git a/src/parser/text_p.cpp b/src/parser/text_p.cpp index 4aa6a68..bd16a60 100644 --- a/src/parser/text_p.cpp +++ b/src/parser/text_p.cpp @@ -22,11 +22,11 @@ text_p::text_p() : text_p::base_type(text_) { text_ = stext_(_r1) | pstext_(_r1) | atom_ | ptext_(_r1); - stext_ = lit("***") >> attr(VSEMPH) >> +text_(_r1) >> "***" - | lit("**") >> attr(SEMPH) >> +text_(_r1) >> "**" - | lit('*') >> attr(EMPH) >> +text_(_r1) >> '*' - | lit("''") >> attr(SALT) >> +text_(_r1)>> "''" - | lit('\'') >> attr(ALT) >> +text_(_r1) >> '\'' + stext_ = lit("***") >> attr(VSEMPH) >> +text_(ph::val(L"*'`$@_[")) >> "***" + | lit("**") >> attr(SEMPH) >> +text_(ph::val(L"*'`$@_[")) >> "**" + | lit('*') >> attr(EMPH) >> +text_(ph::val(L"*'`$@_[")) >> '*' + | lit("''") >> attr(SALT) >> +text_(ph::val(L"*'`$@_["))>> "''" + | lit('\'') >> attr(ALT) >> +text_(ph::val(L"*'`$@_[")) >> '\'' | lit('`') >> attr(CODE) >> +ptext_(val(L"`")) >> '`' | lit('$') >> attr(MATH) >> +ptext_(val(L"$")) >> '$' | lit("^{") >> attr(SUPER) >> +text_(val(L"*'`$^}[")) >> '}' -- cgit v1.2.3-70-g09d2